home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 May / PC Direct CD-ROM (May 1995).ISO / ipe / bri120e / disk1 / bwusage.txt < prev    next >
Encoding:
Text File  |  1994-07-31  |  142.5 KB  |  3,806 lines

  1. BWUSAGE.TXT Headings:
  2.  
  3. 4.0 Software Distribution
  4.     4.1 About BrightWorks' Software Distribution Capability
  5.     4.2 Software Distribution Concepts
  6.     4.3 BrightWorks' Software Distribution Modules
  7.         4.3.1 BrightWorks Console/Administrative Program
  8.         4.3.2 Update Program
  9.     4.4 Distribution Configuration Options
  10.         4.4.1 Running the Update Program
  11.         4.4.2 Automating the Update Program
  12. 5.0 Filesets
  13.     5.1 Introduction
  14.         5.1.1 Fileset Features
  15.         5.1.2 Access to Fileset Functions
  16.         5.1.3 What's in this Chapter
  17.     5.2 The Fileset Directory
  18.         5.2.1 Defining a Fileset Directory
  19.     5.3 Creating Filesets
  20.     5.4 Managing Filesets
  21.         5.4.1 Editing Filesets
  22.         5.4.2 Renaming Filesets
  23.         5.4.3 Copying Filesets
  24.         5.4.4 Deleting Filesets
  25. 6.0 Scripts
  26.     6.1 Introduction
  27.         6.1.1 Script Features
  28.         6.1.2 Access to Script Functions
  29.         6.1.3 What's in this Chapter
  30.     6.2 Creating Scripts
  31.     6.3 Compiling Scripts
  32.     6.4 Managing Scripts
  33.         6.4.1 Editing Scripts
  34.         6.4.2 Renaming Scripts
  35.         6.4.3 Copying Scripts
  36.         6.4.4 Deleting Scripts
  37.         6.4.5 Incorporating BrightWorks Scripts
  38. 7.0 Software Distribution Script Language
  39.     7.1 Introduction
  40.         7.1.1 What's in this Chapter
  41.     7.2 Notes on Syntax
  42.     7.3 Script Functions
  43.         7.3.1 Type of Functions
  44.         7.3.2 User-defined Variables
  45.     7.4 DOS Functions
  46.     7.5 Easy System File Functions
  47.     7.6 Windows System File Functions
  48.     7.7 Miscellaneous Functions
  49.     7.8 Rules and System Variables
  50.         7.8.1 System Variables
  51.         7.8.2 String Type Rules:
  52.         7.8.3 Integer Type Rules:
  53.     7.9 DOS Error Codes
  54. 8.0 Scopes
  55.     8.1 Introduction
  56.         8.1.1 Scope Features
  57.         8.1.2 Access to Scope Functions
  58.         8.1.3 What's in this Chapter
  59.     8.2 Creating Scopes
  60.     8.3 Scope Queries
  61.         8.3.1 Creating a New Query
  62.         8.3.2 Editing a Query
  63.         8.3.3 Deleting a Query
  64.         8.3.4 Applying a Query to the Scope
  65.         8.3.5 Removing a Query from the Scope
  66.         8.3.6 Creating a Complex Query
  67.     8.4 Managing Scopes
  68.         8.4.1 Renaming Scopes
  69.         8.4.2 Copying Scopes
  70.         8.4.3 Deleting Scopes
  71. 9.0 Packages
  72.     9.1 Introduction
  73.         9.1.1 Package Features
  74.         9.1.2 Access to Package Functions
  75.         9.1.3 What's in this Chapter
  76.     9.2 Creating and Editing Packages
  77.         9.2.1 Editing Packages
  78.     9.3 Managing Packages
  79.         9.3.1 Prioritizing Packages
  80.         9.3.2 Renaming Packages
  81.         9.3.3 Activating/Deactivating Packages
  82.         9.3.4 Deleting Packages
  83.     9.4 The Package Timer
  84. 10.0 Monitoring Software Distribution
  85.     10.1 Introduction
  86.         10.1.1 Access to the Software Distribution Log
  87.         10.1.2 What's in this Chapter
  88.     10.2 The Software Distribution Log
  89.         10.2.1 Viewing Log History Details
  90.      
  91.  
  92. 4.0 Software Distribution 
  93.  
  94. Welcome to BrightWorks' distribution features which enable software and  
  95. script distribution from a central location. 
  96.  
  97.  
  98. 4.1 About BrightWorks' Software Distribution Capability 
  99.  
  100. BrightWorks' software distribution capabilities provide a method for  
  101. distributing software packages and modifying workstation configuration  
  102. files from a central location.  The software distribution features  
  103. facilitate consistency among the workstations across your local area  
  104. network and improve the productivity of the LAN Administrator.   
  105.  
  106. Distributing software and modifying workstation configuration files  
  107. from a central location on your network allows the LAN Administrator  
  108. to easily do the following: 
  109.  
  110. o  update system executables and/or drivers (e.g., operating systems,  
  111. network drivers) 
  112.  
  113. o  update system files (e.g., AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, network  
  114. login script) 
  115.  
  116. o  install and update software on user workstations across the local  
  117. area network 
  118.  
  119. NOTE:  BrightWorks' Software Distribution capabilities can be used to  
  120. distribute software and/or scripts to any workstation in the BrightWorks  
  121. local site (i.e., the site which identifies the Fusion program  
  122. directory).  Sites are discussed in detail in section 13.2.1 entitled  
  123. "Maintaining LAN Sites." 
  124.  
  125.  
  126. 4.2 Software Distribution Concepts 
  127.  
  128. An understanding of the following concepts will help you in gaining full  
  129. advantage of BrightWorks' software distribution capabilities: 
  130.  
  131. o  Fileset - A file that contains one or more compressed files.   
  132. Each compressed file may also indicate a target directory structure in  
  133. which the file should be decompressed.  For example, assume a fileset  
  134. named NEW_INI_FILES.  The fileset might consist of two files: WIN.INI  
  135. and SYSTEM.INI which have been defined to be decompressed into a  
  136. target directory named PUB\WIN.310. 
  137.  
  138. o  Script - A sequence of one or more commands which define an operation  
  139. to be performed on a workstation receiving a distribution.  For example,  
  140. a script might include the commands to add a new group to the Windows  
  141. Program Manager, to copy file(s) from one location to another, or to  
  142. change parameters within certain files. 
  143.  
  144. o  Scope - A group of one or more workstations that have been identified  
  145. to receive a distribution.  For example, to distribute a script to all  
  146. 386 workstations, you must create a scope which includes the 386 workstations. 
  147.  
  148. o  Package - The distributed object which contains scheduling information,  
  149. as well as a fileset and/or script and a scope.   
  150.  
  151. The package being created is named "Updated INI Files," as indicated in  
  152. the dialog box title bar.  The package is scheduled to be distributed on  
  153. 6/30/1994.  The package consists of the fileset named "NEW_INI_FILES,"  
  154. which will get distributed to all nodes included in the scope named  
  155. "LOCAL NODES." 
  156.  
  157. The following key features help you distribute software across your LAN: 
  158.  
  159. o  Creating filesets which include files to be installed on remote  
  160. workstations. 
  161.  
  162. o  Creating scripts to be executed by remote workstations. 
  163.  
  164. o  Defining scopes of workstations to receive distributed packages. 
  165.  
  166. o  Creating and scheduling packages which consist of a scope and one  
  167. fileset and/or one script. 
  168.  
  169. o  Monitoring package progress via the Software Distribution Log History  
  170. dialog box. 
  171.  
  172.  
  173. 4.3 BrightWorks' Software Distribution Modules 
  174.  
  175. The BrightWorks software distribution capabilities interact with two  
  176. major functional modules.  As an introduction to software and script  
  177. distribution, this section briefly describes the following modules: 
  178.  
  179. o  BrightWorks console and administrative functions 
  180. o  Remote workstation update program (SDUPDATE.EXE) 
  181.  
  182. NOTE:  BrightWorks' software distribution capabilities are provided with  
  183. the inventory capabilities discussed in Part Three of this manual. 
  184.  
  185. 4.3.1 BrightWorks Console/Administrative Program 
  186.  
  187. BWORKS.EXE is the BrightWorks console and administrative program.  This  
  188. program provides access to all BrightWorks capabilities.  This main module  
  189. is a Windows-based program and is intended to be used by the LAN network  
  190. manager to perform all software distribution functions. 
  191.  
  192. The software distribution functions available from the BrightWorks console  
  193. include: 
  194. o  Scope definition and management 
  195. o  Script creation and management 
  196. o  Package creation, scheduling and management 
  197. o  Pre-defined and custom distribution report generation   
  198.  
  199. 4.3.2 Update Program 
  200.  
  201. The update program (SDUPDATE.EXE) must be executed from each remote  
  202. workstation to enable the workstations to receive the distributed  
  203. packages they have been sent.  Upon BrightWorks installation, the update  
  204. program is copied into the BWORKS program directory. 
  205.  
  206. The update program is DOS-based and must be executed from the machine  
  207. which is to be updated.  To ensure that SDUPDATE.EXE is executed on a  
  208. regular basis, the command can be placed in the system login script.   
  209. Refer to the next section entitled "Distribution Configuration Options." 
  210.  
  211. NOTE:  WSDUPD.EXE is the BrightWorks update program which handles the script  
  212. functions related to installing Windows software.  This program must not be  
  213. directly run by the user--it is automatically loaded when the ADDGROUP,  
  214. ADDITEM or SCHEDULEWIN Windows System File script functions are used.  Refer  
  215. to section 7.6 entitled "Windows System File Functions." 
  216.  
  217.  
  218. 4.4 Distribution Configuration Options 
  219.  
  220. The update program SDUPDATE.EXE must be run from each workstation in  
  221. order for it to receive the distributed packages it has been sent.   
  222. Upon BrightWorks installation, the update program is copied into the  
  223. BWORKS program directory.   
  224.  
  225. The SDUPDATE program's syntax is as follows: 
  226.  
  227. SDUPDATE [drive:[\path]] 
  228.  
  229. in which drive and path are optional parameters.  The brackets are not typed.  
  230.  
  231. Consider the following examples: 
  232.  
  233. Example                 Result 
  234. SDUPDATE                SDUPDATE will look in the current directory. 
  235. SDUPDATE F:             SDUPDATE will look in the current directory  
  236.             on drive F:. 
  237. SDUPDATE F:\path        SDUPDATE will look in the directory F:\path. 
  238.  
  239.  
  240. NOTES: a - The Btrieve Record Manager must be loaded before running  
  241. SDUPDATE.EXE.  Refer to the section entitled "Consider Improving  
  242. BrightWorks' Database Performance" in Chapter 3 of the LAN Inventory manual 
  243. for a  discussion on the Btrieve options. 
  244. b - When running the Brequestor, BSPXCOM and BROUTER must also be loaded  
  245. on the file server.  For details on loading these programs, refer to  
  246. your Novell documentation. 
  247. c -  When running SDUPDATE.EXE in a DOS box, you must load another  
  248. session of BREQUEST by entering the following command: 
  249.  
  250.      BREQUEST /D:17000 /L 
  251.  
  252. After running SDUPDATE, end the additional session by issuing the  
  253. ENDBTRV command. 
  254.  
  255. 4.4.1 Running the Update Program 
  256.  
  257. Use the following procedure to manually run the update program at a  
  258. workstation. 
  259.  
  260. 1.  At the workstation which is to receive the distributed package, load  
  261.     the Btrieve Record Manager. 
  262.  
  263.     Either Btrieve or Brequest can be used.  Refer to section 12.6.3 entitled  
  264.     "Consider Improving BrightWorks' Database Performance" for a discussion  
  265.     on the Btrieve options. 
  266.  
  267. 2.  Make the BrightWorks directory your current directory. 
  268.  
  269.     Use the DOS CD command to change into the BWORKS program directory,  
  270.     or map a physical drive to the BWORKS directory. 
  271.  
  272. 3.  Execute the SDUPDATE.EXE program. 
  273.  
  274.     For example, enter the following at the DOS command line: 
  275.  
  276.     SDUPDATE 
  277.  
  278.     Upon executing SDUPDATE, several messages will display at the workstation.   
  279.     If the user has not been given the option to refuse the update or  
  280.     change the installation path, then the update program will continue  
  281.     automatically (e.g., the package's script or fileset will be installed 
  282.     at the workstation). 
  283.  
  284.     a. If you are given the option of refusing the package, then the  
  285.     prompt displays.  To install the package at this time, type <Y>.   
  286.     To install the package another time (e.g., the next time the update  
  287.     program is run), type <N>. 
  288.  
  289.     NOTE:  If the date or maximum number of times has expired and the  
  290.     package is configured to 'force upgrade,' then the package will be  
  291.     installed regardless of the user's response to this prompt. 
  292.  
  293.     b. If you are given the option of overriding the installation path,  
  294.     then the prompt displays.  To override the default installation path,  
  295.     type <Y>.  To accept the default installation path, type <N>.  If  
  296.     you type <Y> to override the default installation path, you are  
  297.     prompted to specify a new installation path.  Type the new path and  
  298.     press the <ENTER> key.  The update program continues, and the package  
  299.     is installed. 
  300.  
  301. 4.4.2 Automating the Update Program  
  302.  
  303. To ensure that SDUPDATE is executed on a regular basis, the command can  
  304. be placed in the system login script.   
  305.  
  306. The following example illustrates SDUPDATE being executed from within  
  307. the system login script.  (Refer section 35.0 for instructions on  
  308. configuring the Btrieve NLM or VAP.) 
  309.  
  310. .... 
  311. MAP G:=SERVER/SYS:FUSION 
  312. DRIVE G: 
  313. #BREQUEST /D:17000 
  314. #SDUPDATE 
  315. #ENDBTRV 
  316. .... 
  317.  
  318. where G:=SERVER/SYS:FUSION is the drive ID and complete path where the  
  319. BrightWorks files and update program are stored. 
  320.  
  321.  
  322.  
  323.  
  324.  
  325. 5.0 Filesets 
  326.  
  327. Chapter 4 provided an introduction to BrightWorks' software distribution  
  328. capability.  This chapter discusses the creation and management of  
  329. filesets--the set of files to be installed on a remote workstation. 
  330.  
  331.  
  332.  
  333. 5.1 Introduction 
  334.  
  335. A fileset is a set of files, stored in compressed format, to be installed  
  336. on a remote workstation.  Distributing filesets from a central location  
  337. simplifies a System Administrator's job.  Instead of physically moving  
  338. from workstation to workstation to install or upgrade application files, the  
  339. Administrator only needs to centrally distribute one fileset consisting  
  340. of the application files.  Upon receipt at a remote workstation, the  
  341. fileset contents are decompressed and copied onto the workstation's  
  342. hard drive.   
  343.  
  344. 5.1.1 Fileset Features 
  345.  
  346. In addition to containing a number of files to be distributed, filesets  
  347. can be defined to create a target directory structure.  For example, if  
  348. you create a fileset which includes all files for Windows 3.1, you must  
  349. also define the contents of the SYSTEM subdirectory.  BrightWorks  
  350. can do this for you automatically by including the full path name of  
  351. every file included in the fileset.  
  352.  
  353. Filesets and scripts are a powerful combination.  Consider the following  
  354. examples: 
  355.  
  356. o  Packaging the latest WIN.INI file with a script which determines  
  357. whether the existing WIN.INI file is outdated.  The script will also  
  358. copy the new WIN.INI if an old file is detected. 
  359.  
  360. o  Packaging the Novell IPXODI files and sending them to the scope of  
  361. nodes using IPX.  After the fileset is decompressed in the target  
  362. directory, the script will update the AUTOEXEC.BAT file to reflect the  
  363. use of IPXODI.  
  364.  
  365. Filesets can be stored, used and reused as a resource within BrightWorks.   
  366. An administrator can create a new fileset, as well as edit, copy, rename  
  367. and delete a fileset.  The steps for each procedure are provided in this  
  368. chapter. 
  369.  
  370. 5.1.2 Access to Fileset Functions 
  371.  
  372. Most fileset functions are accessed by choosing the Filesets command  
  373. from the Tools menu.  The Filesets dialog box displays listing all  
  374. available filesets. 
  375.  
  376. The process of defining a directory in which filesets are saved (the  
  377. "default fileset directory") is performed by choosing the Distribution  
  378. command from the Administration menu.  From the sub-menu that displays,  
  379. choose the Preferences command.  
  380.  
  381. 5.1.3 What's in this Chapter 
  382.  
  383. The following chart describes the sections in this chapter: 
  384.  
  385. SECTION                         DESCRIPTION 
  386. The Fileset Directory           Discusses the fileset directory,  
  387.                 and describes the procedures for its  
  388.                 definition. 
  389.  
  390. Creating Filesets               Describes procedures for defining new  
  391.                 filesets. 
  392.  
  393. Managing Filesets               Describes procedures for editing, renaming,  
  394.                 copying and deleting filesets. 
  395.  
  396.  
  397. 5.2 The Fileset Directory 
  398.  
  399. The fileset directory defines the path in which filesets are stored.   
  400. Upon saving a fileset, a copy of the files that are included in the  
  401. fileset are compressed.  They are stored in a file which is placed in the  
  402. fileset directory defined at the time the fileset is saved.  For example,  
  403. if your fileset directory is defined as F:\FUSION\FILESETS, then the  
  404. filesets that you create will be stored in the F:\FUSION\FILESETS directory. 
  405.  
  406. 5.2.1 Defining a Fileset Directory 
  407.  
  408. Use the following procedure to define the directory in which filesets  
  409. should be stored. 
  410.  
  411. 1.  Choose the Distribution command from the Administration menu.  From  
  412.     the sub-menu that displays, choose the Preferences command. 
  413.  
  414.     The Preferences dialog box displays. 
  415.  
  416. 2.  Choose the Browse button to define the pathname into which the  
  417.     compressed filesets are to be stored. 
  418.  
  419.     The Path Browse dialog box displays enabling you to select from  
  420.     the lists of Drives and Directories.  Click on the Drives and  
  421.     Directories fields to select the desired pathname. 
  422.  
  423. 3.  When the pathname is selected, choose the OK button. 
  424.  
  425.     The Path Browse dialog box closes, and the selected pathname displays  
  426.     in the Path to Filesets field of the Preferences dialog box. 
  427.  
  428. 4.  Choose the Save button to define the fileset directory. 
  429.  
  430.     All saved filesets will be stored in the defined directory. 
  431.  
  432. NOTE:  The fileset directory instructs the update program as to where  
  433. the filesets are located.  As a result, changing the fileset directory  
  434. after you have created filesets and included them in packages can  
  435. invalidate those packages.  If you change the default directory, you must  
  436. also copy all fileset files (*.SET) into the new fileset directory.   
  437. Be sure that each user has the same drive letter mapped to the same  
  438. server/volume specified in the Preferences dialog box.  Also, you cannot  
  439. store filesets on a non-network drive. 
  440.  
  441.  
  442. 5.3 Creating Filesets 
  443.  
  444. Use the following procedure to create a new fileset. 
  445.  
  446. 1.  Choose the Filesets command from the Tools menu. 
  447.  
  448.     The Filesets dialog box displays listing the names of all defined  
  449.     filesets.   
  450.  
  451. 2.  Choose the New button. 
  452.  
  453.     The New Fileset dialog box displays prompting you to enter a name  
  454.     for the new fileset.   
  455.  
  456. 3.  Enter the new fileset name, and choose the OK button. 
  457.  
  458.     A fileset name can be up to 80 characters, and all typed characters  
  459.     are valid. 
  460.  
  461.     Upon choosing the OK button, the Edit Fileset dialog box displays  
  462.     prompting you to define the contents of the new fileset.   
  463.  
  464.     The fileset name being created or edited displays in the title bar of  
  465.     the Edit Fileset dialog box. The name of the fileset being created  
  466.     is "1994 Budget Files." 
  467.  
  468.     For each file included in the fileset, the following information displays:  
  469.     File Name, Original Size, Compression Ratio, Date, Time, and Path.  The  
  470.     file list area is empty for new filesets.   
  471.  
  472.     The Filename field in this dialog box displays the name of the file  
  473.     which will hold the compressed fileset. Upon saving the fileset, a  
  474.     compressed copy of all of the listed files will be stored in the file  
  475.     named "1994BUDG.SET."  This file is automatically created by BrightWorks  
  476.     when the fileset is created.  It is stored in the fileset directory  
  477.     which is currently defined. 
  478.  
  479. 4.  To add a file to the fileset, choose the Add button. 
  480.  
  481.     The Add File dialog box displays.  This dialog box is a standard  
  482.     Windows dialog box used for opening, selecting and browsing files.   
  483.  
  484. 5.  Make selections from the Directories and Drives lists to find the file(s)  
  485.     to include in the fileset.  
  486.  
  487.     For example, choose the Drives down arrow button, and click on Drive C:  
  488.     to display the directories on drive C.  From the list of directories  
  489.     which displays, click on one to display its file list. 
  490.  
  491. 6.  Select a file(s) from the File Name list. 
  492.  
  493.     Multiple files can be selected using the Windows extended select  
  494.     procedures (i.e., hold down the <CTRL> or <SHIFT> key while selecting  
  495.     files). 
  496.  
  497. 7.  To include the selected file(s)' path in the Edit Fileset dialog box,  
  498.     enable the Include Path option. 
  499.  
  500.     Placing a checkmark in this field causes the full pathnames of each  
  501.     selected file to be listed in the Edit Fileset dialog box.  (Step #9  
  502.     below provides the option to instruct the fileset to create the  
  503.     directory structure at the receiving workstation.) 
  504.  
  505. 8.  Choose the OK button. 
  506.  
  507.     Upon choosing the OK button, the selected files are listed in the Edit  
  508.     Fileset dialog box.  Only the File Name and Path information display  
  509.     at this time.  The other fields are not available until the fileset is  
  510.     saved. 
  511.  
  512. 9.  Enable or disable the Create Directory Structure option. 
  513.  
  514.     Enabling this option causes the full pathnames of each file listed in  
  515.     the Edit Fileset dialog box to be created at the receiving workstation.   
  516.     For example, assume that this option is enabled and a file is listed in  
  517.     the Edit Fileset dialog box as \USER\MARY\INVOICE.DOC.  In this  
  518.     case, the directories USER and MARY will be created at the receiving  
  519.     workstation if they do not already exist. 
  520.  
  521. NOTE:  A fileset is always decompressed into the target directory that  
  522. is specified when creating a package.  In the above example, if the Create  
  523. Directory Structure option is checked and the fileset is included in a  
  524. package that has a default path of C:\SALES, then the INVOICE.DOC file  
  525. will be decompressed into C:\SALES\USER\MARY. 
  526.  
  527. 10. To save the fileset contents, choose the Save button. 
  528.  
  529.     The changes made to a fileset are only committed to upon choosing the  
  530.     Save button.  The Updating Fileset dialog box displays while the  
  531.     fileset contents are being saved and compressed.  If you attempt to  
  532.     close the Edit Filesets dialog box without saving, you are prompted to  
  533.     save the fileset changes. 
  534.  
  535.     The fileset is created and added to the Filesets dialog box. 
  536.  
  537.  
  538. 5.4 Managing Filesets 
  539.  
  540. This section describes the procedures for editing, renaming, copying and  
  541. deleting filesets. 
  542.  
  543. 5.4.1 Editing Filesets 
  544.  
  545. Editing a fileset may become necessary in order to add or delete a  
  546. file according to a change in a fileset's intent. 
  547.  
  548. NOTE:  It is recommended that you temporarily deactivate any packages  
  549. which use the fileset you intend to edit. 
  550.  
  551. Use the following procedure to edit the contents of a fileset.  The  
  552. procedure assumes that you have already chosen the Filesets command from  
  553. the Tools menu to display the Filesets dialog box. 
  554.  
  555. 1.  Select the fileset from the list of Filesets, and choose the Edit button. 
  556.  
  557.     A fileset can also be selected for editing by double clicking on the  
  558.     fileset name in the Filesets dialog box.  The Edit Fileset dialog box  
  559.     displays listing all files included in the fileset.  
  560.  
  561.     For each file in the fileset, the following information displays: 
  562.  
  563.     o  File Name - the name of the file 
  564.     o  Original Size - the file size before compression 
  565.     o  Compressed Size - the file size after compression 
  566.     o  Ratio - the compression ratio 
  567.     o  Date - the file's creation date 
  568.     o  Time - the file's creation time 
  569.     o  Path - the file's path which displays only if the Include Path  
  570.     option is checked in the Add File dialog box. 
  571.  
  572. NOTE:  Some files may show a 0% compression ratio.  This occurs when the  
  573. file is already compressed or when the file is very small. 
  574.  
  575. 2.  To add a file to the fileset, choose the Add button. 
  576.  
  577.     The Add File dialog box displays.  Refer to the section above entitled  
  578.     "Creating Filesets" for detailed procedures on using this dialog box. 
  579.  
  580. 3.  To delete a file from the fileset, highlight the file name and choose  
  581.     the Delete button.  
  582.  
  583.     A prompt displays asking you to confirm the deletion.  Choose the Yes  
  584.     button to continue with the delete action. 
  585.  
  586.     If deleted, the file name is removed from the Edit Filesets dialog box.   
  587.  
  588. 4.  To save the edited fileset contents, choose the Save button. 
  589.  
  590.     The changes made to a fileset are only committed to upon choosing the  
  591.     Save button.  The Updating Fileset dialog box displays while the  
  592.     fileset contents are being saved and compressed.  If you attempt to  
  593.     close the Edit Filesets dialog box without saving, you are prompted to  
  594.     save the fileset changes. 
  595.  
  596. 5.4.2 Renaming Filesets 
  597.  
  598. Changing the name of an existing fileset renames all instances of the  
  599. former fileset name.  For example, the new fileset name is reflected in  
  600. the Filesets dialog box as well as in any packages which include the fileset. 
  601.  
  602. Use the following procedure to rename a fileset.  The procedure assumes  
  603. that you have already chosen the Filesets command from the Tools menu to  
  604. display the Filesets dialog box. 
  605.  
  606. NOTES: a - A fileset can be renamed even if it is part of an actively  
  607. scheduled package. 
  608. b - The name of the .SET file which is maintaining the compressed fileset  
  609. and is stored in the fileset directory does not change.  
  610.  
  611. 1.  To rename a fileset, select the fileset name from the list of Filesets,  
  612.     and choose the Rename button. 
  613.  
  614.     The Rename Fileset dialog box displays prompting you to enter a new  
  615.     fileset name. 
  616.  
  617. 2.  Enter the new fileset name, and choose the OK button. 
  618.  
  619.     The new fileset name displays in the Filesets dialog box, and the  
  620.     old name is removed.  All attributes of the old fileset are preserved  
  621.     in the renamed fileset (i.e., the fileset contents do not change). 
  622.  
  623. 5.4.3 Copying Filesets 
  624.  
  625. Use the following procedure to copy a fileset.  The procedure assumes that  
  626. you have already chosen the Filesets command from the Tools menu to display  
  627. the Filesets dialog box. 
  628.  
  629. NOTE:  A fileset can be copied even if the original fileset is part of  
  630. an actively scheduled package. 
  631.  
  632. 1.  To copy a fileset, select the fileset name from the list of Filesets,  
  633.     and choose the Copy button. 
  634.  
  635.     The Copy Fileset dialog box displays prompting you to enter a name  
  636.     for the new fileset. 
  637.  
  638. 2.  Enter the new fileset name, and choose the OK button. 
  639.  
  640.     The new fileset name is added to the Filesets dialog box.  The new  
  641.     fileset contents are identical to the original fileset contents. 
  642.  
  643. 5.4.4 Deleting Filesets 
  644.  
  645. Use the following procedure to delete a fileset.  The procedure assumes  
  646. that you have already chosen the Filesets command from the Distribution  
  647. menu to display the Filesets dialog box. 
  648.  
  649. NOTE:  A fileset that is part of a scheduled package cannot be deleted. 
  650.  
  651. 1.  To delete a fileset, select the fileset from the list of Filesets,  
  652.     and choose the Delete button. 
  653.  
  654.     A prompt displays asking you to confirm the deletion. 
  655.  
  656. 2.  Choose the Yes button to delete the fileset. 
  657.  
  658.     The fileset name is removed from the Filesets dialog box.   
  659.  
  660.  
  661.  
  662. 6.0 Scripts 
  663.  
  664. Chapter 5 discussed the creation and management of filesets.  This  
  665. chapter discusses the creation and management of scripts--a series  
  666. of commands to be executed on a remote workstation. 
  667.  
  668.  
  669.  
  670. 6.1 Introduction 
  671.  
  672. A script is a series of commands to be executed on a remote workstation.   
  673. Scripts must be written according to a defined syntax, and they must be  
  674. compiled successfully to be included in a package.   
  675.  
  676. NOTES: a - The commands and instructions for using BrightWorks' software  
  677. distribution scripting language are documented in Chapter 7 of this  
  678. manual. 
  679. b - BrightWorks is shipped with several script files that can be  
  680. customized for your own use. Refer to section 6.4.5 entitled "Incorporating  
  681. BrightWorks Scripts."  
  682.  
  683. 6.1.1 Script Features 
  684.  
  685. The ability to send scripts from a central location can be used to  
  686. contribute to the consistency and standardization of LAN workstations.   
  687. Scripts enable the LAN administrator to easily do the following: 
  688.  
  689. o  update system executables and/or drivers (e.g., operating systems,  
  690. network drivers) 
  691.  
  692. o  update system files (e.g., AUTOEXEC.BAT, CONFIG.SYS, WIN.INI,  
  693. network login script) 
  694.  
  695. o  install software on a user's workstation 
  696.  
  697. A user can create a new script, as well as edit, compile, copy, rename  
  698. and delete a script.  The steps for each procedure are discussed in this  
  699. chapter.   
  700.  
  701. 6.1.2 Access to Script Functions 
  702.  
  703. Script functions are accessed by choosing the Scripts command from the  
  704. Tools menu.  The Scripts window displays listing all available scripts.   
  705.  
  706. Script management is performed by either choosing the buttons in the  
  707. Scripts window or by choosing the corresponding commands from the File menu.   
  708. For example, when the Scripts window is active, a new script can be  
  709. created either by choosing the New button in the Scripts window or by  
  710. choosing the New Script command from the File menu.   
  711.  
  712. The Edit menu commands provide the standard Cut, Copy and Paste functionality  
  713. for use during script editing. 
  714.  
  715. 6.1.3 What's in this Chapter 
  716.  
  717. The following chart describes the sections in this chapter: 
  718.  
  719. SECTION                 DESCRIPTION 
  720. Creating Scripts        Describes procedures for defining new scripts. 
  721.  
  722. Compiling Scripts       Describes the procedures for compiling scripts. 
  723.  
  724. Managing Scripts        Describes procedures for editing, renaming,  
  725.             copying and deleting scripts. 
  726.  
  727.               
  728. 6.2 Creating Scripts 
  729.  
  730. A script is created by assigning both a script name and a file name to  
  731. the new script.  The script name is used for identification purposes  
  732. within BrightWorks.  For example, it is immediately obvious that the  
  733. script named "Upgrade to Win 3.1" is responsible for upgrading the  
  734. Windows software to version 3.1.  The script file name identifies the  
  735. ASCII text file containing the script commands.  The script file name  
  736. must be a valid DOS file name (e.g., 8 characters plus the 3 character  
  737. extension). 
  738.  
  739. After assigning the script name and file name, an "empty" script is created.   
  740. The empty script must be edited in order to add commands.   
  741.  
  742. Use the following procedure to create a new script. 
  743.  
  744. 1.  Choose the Scripts command from the Tools menu. 
  745.  
  746.     The Scripts window displays listing the names of all defined scripts.   
  747.     For each script, the last compilation date, the status and the file name  
  748.     also displays. 
  749.  
  750. 2.  Choose the New button. 
  751.  
  752.     The Open New Script dialog box displays prompting you to enter the  
  753.     name, file name and destination directory for the new script.   
  754.  
  755. 3.  Enter the new script information, and choose the OK button. 
  756.  
  757.     The script name can be up to 80 characters, and all typed characters  
  758.     are valid.  The script file name must follow the standard DOS conventions. 
  759.  
  760. NOTES: a - It is recommended that .SCR be assigned as the extension for  
  761. all script file names.  A script file is a text file and can be edited  
  762. with an external editor. 
  763. b - The scripts must reside on a network drive to which all users who will  
  764. receive the script have access 
  765.  
  766. Upon choosing OK, the message "This file does not exist.  Create the file?"  
  767. displays.  Choose the Yes button to create the script file and display the  
  768. Script Editor window. 
  769.  
  770. The script name being edited displays in the title bar of the Script Editor  
  771. window.  All commands that are included in this script are listed.  (The  
  772. list is empty for new scripts.) 
  773.  
  774. 4.  Type the script commands. 
  775.  
  776.     Script commands can be directly typed into the Script Editor window.   
  777.     Commands can also be selected from a list of commands by choosing the  
  778.     Functions button in the Script Editor window or the Paste Script  
  779.     Function command from the BrightWorks Edit menu (refer to the  
  780.     explanation below). 
  781.  
  782.     The script compiler requires one command per line.  No error checking  
  783.     is performed until the script is compiled. 
  784.  
  785.     Optional comments can be placed in the script preceded by a semi-colon.   
  786.     These comments are ignored at compile time.  For example: 
  787.  
  788.     ;This is a comment. 
  789.  
  790. NOTE:  The commands and rules for using the scripting language are  
  791. documented in Chapter 7 of this manual, "Software Distribution Script  
  792. Language." 
  793.  
  794. Standard editing functions are available from the Edit menu on the  
  795. BrightWorks menu bar.  The commands that are available from the Edit menu  
  796. are as follows: 
  797.  
  798. o  Undo - removes the last change made to the script. 
  799.  
  800. o  Cut - copies a block of selected text to the clipboard and removes the  
  801. text from the Script Editor window. 
  802.  
  803. o  Copy - copies a block of selected text to the clipboard. 
  804.  
  805. o  Paste - places the block of text from the clipboard into the Script  
  806. Editor window at the current cursor location. 
  807.  
  808. o  Paste Script Function - displays the Choose Script Function dialog box.   
  809. This dialog box allows you to select a function (from a list of all script  
  810. functions) to be placed in the script at the current cursor location.  A  
  811. function can be selected by either double clicking on the function name,  
  812. or highlighting the name and choosing the OK button.  Choosing the Help  
  813. button displays help text for the highlighted function. 
  814.  
  815. o  Find - searches the script for a user-specified text string. 
  816.  
  817. o  Next - searches the script for the next occurrence of the user-specified  
  818. text string. 
  819.  
  820. o  Replace -  searches the script for a user-specified text string and  
  821. replaces the found text with another user-specified text string. 
  822.  
  823. o  Fonts - enables you to select the font, style and size of the script type. 
  824.  
  825. NOTE:  During script editing, the status bar in the BrightWorks application  
  826. window indicates the current line and column position of the typing cursor. 
  827.  
  828. 5.  To compile the script, choose the Compile button in the Script Editor  
  829.     window. 
  830.  
  831.     Refer to the next section for details on compiling scripts. 
  832.  
  833. 6.  To save the script contents, choose the Save button in the Script  
  834.     Editor window. 
  835.   
  836.     The saved script contents are stored in ASCII text format.  The script  
  837.     must be compiled to be used in a package.  To compile the script, follow  
  838.     the procedure below entitled "Compiling Scripts." 
  839.  
  840. 7.  Choose the Close button to close the Script Editor window. 
  841.  
  842.     If you did not save the script changes as in Step #6 above, you are  
  843.     prompted to do so now.  Choose the Yes button to save the script changes,  
  844.     or choose No to close the Script Editor without saving any changes. 
  845.  
  846.     The new script is added to the Scripts window.  The status of all  
  847.     uncompiled scripts is 'ASCII.'   A script must be compiled to be used  
  848.     in a package. 
  849.  
  850.  
  851. 6.3 Compiling Scripts 
  852.  
  853. The Status field in the Scripts window indicates the status of each script.   
  854. Script status can be either ASCII or COMPILED.  A script's status must be  
  855. COMPILED to be used in a package for distribution. 
  856.  
  857. The commands and instructions for using the scripting language are documented  
  858. in Chapter 7 of this manual, "Software Distribution Script Language."   
  859. The compilation process checks the syntax and validity of the script's  
  860. commands. 
  861.  
  862. Use the following procedure to compile a script.  The procedure assumes  
  863. that you have already chosen the Scripts command from the Tools menu to  
  864. display the Scripts window. 
  865.  
  866. 1.  To compile a script, select the script in the Scripts window and  
  867.     choose the Compile button. 
  868.  
  869.     While a compile is in progress, the Compile Status dialog box displays.   
  870.  
  871.     When the compile is complete, the Status field in the Compile Status  
  872.     dialog box indicates success or failure.  If the compile fails, the  
  873.     Function field indicates the first function found which has invalid  
  874.     parameters.  The Statistics area indicates the total number of lines in  
  875.     the script (Lines field) and the number of errors found (Errors field). 
  876.  
  877. 2.  Choose the OK button to continue. 
  878.  
  879.     If the script compile is successful, then choose the Close button in  
  880.     the Script Editor window to return to the Scripts window which shows  
  881.     the script's status as COMPILED. 
  882.  
  883.     If the script compile fails, then the Compiler Messages dialog box  
  884.     displays listing the first script line which contains errors. 
  885.  
  886. 3.  To correct a compiler error condition, double click on an error line  
  887.     in the Compiler Messages dialog box. 
  888.  
  889.     The Script Editor window displays with the script that you are  
  890.     attempting to compile.  The selected error line is automatically  
  891.     highlighted. 
  892.  
  893. 4.  Correct all error conditions, and attempt to re-compile the script. 
  894.  
  895.     Refer to Chapter 7 of this manual for details on the scripting rules  
  896.     and commands. 
  897.  
  898.     After successful compilation of the script, the script can be used  
  899.     in a package. 
  900.  
  901. NOTE:  If you edit a script that has already been compiled, the script  
  902. must be successfully re-compiled in order to be used in a package.   
  903. Refer to the "Last Comp" field in the Scripts window to discover the date  
  904. on which the file was last compiled. 
  905.  
  906.  
  907. 6.4 Managing Scripts 
  908.  
  909. 6.4.1 Editing Scripts 
  910.  
  911. Editing a script may be necessary under two circumstances: 
  912.  
  913. o  Existing scripts might need to be edited in order to add or delete  
  914. commands according to a change in a script's intent. 
  915.  
  916. o  When a script compilation fails, the script must be edited to resolve  
  917. the error(s). 
  918.  
  919. NOTE:  It is recommended that you temporarily deactivate any packages  
  920. which use the script you intend to edit. 
  921.  
  922. Use the following procedure to edit the contents of a script.  The  
  923. procedure assumes that you have already chosen the Scripts command from  
  924. the Tools menu to display the Scripts window. 
  925.  
  926. 1.  Select the script from the Scripts window, and choose the Edit button. 
  927.  
  928.     A script can also be selected for edit by double clicking on the script  
  929.     name in the Scripts window.  The Script Editor window displays. 
  930.  
  931.     The script name being edited displays in the title bar of the Script  
  932.     Editor window.  All commands that are included in this script are listed. 
  933.  
  934. 2.  Edit the script commands. 
  935.  
  936.     Script commands can be directly typed into the Script Editor window.   
  937.     Commands can also be selected from a list of commands by choosing the  
  938.     Functions button in the Script Editor window or the Paste Script Function  
  939.     command from the BrightWorks Edit menu. 
  940.  
  941.     The script compiler requires one command per line.  No error checking is  
  942.     performed until the script is compiled. 
  943.  
  944. NOTES: a - The commands and rules for using the scripting language are  
  945. documented in Chapter 7 of this manual, "Software Distribution Script  
  946. Language." 
  947. b - During script editing, the status bar in the BrightWorks application  
  948. window indicates the current line and column position of the typing cursor. 
  949.  
  950. 3.  To compile the script, choose the Compile button in the Script Editor  
  951.     window. 
  952.  
  953.     Refer to section 6.3 entitled "Compiling Scripts" for details on  
  954.     compiling scripts. 
  955.  
  956. 4.  To save the edited script contents, choose the Save button in the  
  957.     Script Editor window. 
  958.  
  959. 5.  Choose the Close button to close the Script Editor window. 
  960.  
  961. NOTE:  If you edit a script that has already been compiled, the script  
  962. must be successfully re-compiled in order to be used in a package. 
  963.  
  964. 6.4.2 Renaming Scripts 
  965.  
  966. Changing the name of an existing script renames all instances of the  
  967. former script name.  For example, the new script name will be reflected  
  968. in the Scripts window as well as in any packages which include the script. 
  969.  
  970. Use the following procedure to rename a script.  The procedure assumes  
  971. that you have already chosen the Scripts command from the Tools menu to  
  972. display the Scripts window. 
  973.  
  974. NOTE:  A script can be renamed even if it is part of an actively scheduled  
  975. package. 
  976.  
  977. 1.  To rename a script, select the script name from the Scripts, and choose  
  978.     the Rename button.  
  979.  
  980.     The Rename Script dialog box displays prompting you to enter a new  
  981.     script name. 
  982.  
  983. 2.  Enter the new script name, and choose the OK button. 
  984.  
  985.     The new script name displays in the Scripts window, and the old name  
  986.     is removed.  All attributes of the old script are preserved in the  
  987.     renamed script (i.e., the script contents do not change). 
  988.  
  989. NOTE:  The script rename procedure only changes the script name--the script  
  990. file name does not change. 
  991.  
  992. 6.4.3 Copying Scripts 
  993.  
  994. Use the following procedure to copy a script.  The procedure assumes that  
  995. you have already chosen the Scripts command from the Tools menu to display  
  996. the Scripts window. 
  997.  
  998. NOTE:  A script can be copied even if the original script is part of an  
  999. actively scheduled package. 
  1000.  
  1001. 1.  To copy a script, select the script from the Scripts, and choose the  
  1002.     Copy button.  
  1003.  
  1004.     The Copy Script dialog box displays prompting you to specify a name,  
  1005.     file name and destination directory for the new script.  The script  
  1006.     name can be up to 80 characters, and all typed characters are valid.   
  1007.     The script file name must follow the standard DOS conventions and can  
  1008.     reside in any directory. 
  1009.  
  1010. NOTE:  It is recommended that .SCR be assigned as the extension for all  
  1011. script file names. 
  1012.  
  1013. 2.  Enter the new script information, and choose the OK button. 
  1014.  
  1015.     The new script name is added to the Scripts window.  The new script is  
  1016.     populated with the same commands as the original script. 
  1017.  
  1018. 6.4.4 Deleting Scripts 
  1019.  
  1020. Use the following procedure to delete a script.  The procedure assumes that  
  1021. you have already chosen the Scripts command from the Tools menu to display  
  1022. the Scripts window. 
  1023.  
  1024. NOTE:  A script that is part of a scheduled package cannot be deleted. 
  1025.  
  1026. 1.  To delete a script, select the script from the Scripts, and choose the  
  1027.     Delete button.   
  1028.  
  1029.     A prompt displays asking you to confirm the deletion. 
  1030.  
  1031. 2.  Choose the Yes button to delete the script. 
  1032.  
  1033.     If deleted, the script name is removed from the Scripts window.   
  1034.  
  1035. NOTE:  The delete action only deletes the script name from the Scripts  
  1036. window.  The corresponding .SCR file is not deleted.  Therefore, if a script  
  1037. name is inadvertently deleted, you can create a new script and assign the  
  1038. same script file name to retrieve the deleted script contents. 
  1039.  
  1040. 6.4.5 Incorporating BrightWorks Scripts 
  1041.  
  1042. BrightWorks is shipped with several pre-defined scripts that can be  
  1043. customized for use in your environment.  Upon BrightWorks installation, the  
  1044. script files are copied into the BWORKS program directory.   
  1045.  
  1046. The table below lists the purpose of each script and indicates the script  
  1047. file name: 
  1048.  
  1049. PURPOSE                                 FILE NAME 
  1050. Word for Windows Local Installation     LOCAL.SCR 
  1051. Find and Delete a Program File          FINDDEL.SCR 
  1052. AUTOEXEC.BAT Replacement                AUTORLP.SCR 
  1053. AUTOEXEC.BAT Append                     AUTOAPP.SCR 
  1054. AUTOEXEC.BAT Modification               AUTOMOD.SCR 
  1055. CONFIG.SYS Replacement                  CFGRPLMT.SCR 
  1056. CONFIG.SYS Append                       CFGAPP.SCR 
  1057. CONFIG.SYS Modification                 CFGMOD.SCR 
  1058. DOS Upgrade 3.X to 6.X                  DOS3TO6.SCR 
  1059. DOS Upgrade 4.X to 5.X                  DOS4TO5.SCR 
  1060. DOS Upgrade 5.X to 6.X                  DOS5TO6.SCR 
  1061. Novell NETX Update                      NETXUP.SCR 
  1062. Novell Wkst ODI/VLM/IPX Driver          NETBAT.SCR  
  1063. Startup Batch File Update         
  1064. VLM Upgrade                             VLMUPGRD.SCR 
  1065. Send Text Message to Network Users      TYPE.SCR 
  1066. Copy Files to Server                    CPFS.SCR 
  1067. Windows Network Installation            WININST.SCR 
  1068. Windows Add Program Group               ADDGROUP.SCR 
  1069. Windows Add Program Item                ADDITEM.SCR 
  1070. Windows INI Replacement                 INIRPL.SCR 
  1071. Windows INI Append                      WINIAPPD.SCR 
  1072. Windows INI Modification                WININIMD.SCR 
  1073. Windows Spooler Setting in INI          WINSPOOL.SCR 
  1074. Install SMRAGENT.EXE                    AGENT.SCR 
  1075. Windows Wallpaper Update                WALLPAPR.SCR 
  1076. CC:MAIL for Windows installation        NETINS.SCR 
  1077.  
  1078. Use the following procedure to incorporate a pre-defined script into  
  1079. BrightWorks. 
  1080.  
  1081. 1.  Choose the Scripts command from the Tools menu. 
  1082.  
  1083.     The Scripts window displays. 
  1084.  
  1085. 2.  Choose the New button. 
  1086.  
  1087.     The Open New Script dialog box displays.   
  1088.  
  1089. 3.  Enter a name for the script in the Script Name field. 
  1090.  
  1091.     The script name can be up to 80 characters, and all typed characters  
  1092.     are valid.  The script name is used within BrightWorks to identify the  
  1093.     script.  For example, if you are incorporating the script which adds a  
  1094.     group to the Program Manager desktop, then you might want to define  
  1095.     the script name as ADD PROGRAM GROUP. 
  1096.  
  1097. 4.  Select the script to be incorporated into BrightWorks. 
  1098.  
  1099.     Select a script from the list of script file names.  For example, if  
  1100.     you want to incorporate and edit the script which adds a group to the  
  1101.     Program Manager desktop, then you would select the ADDGROUP.SCR file. 
  1102.  
  1103. 5.  Choose the OK button. 
  1104.  
  1105.     The Script Editor window displays listing the commands for the chosen  
  1106.     script. 
  1107.  
  1108. 6.  Edit the script commands. 
  1109.  
  1110.     The commands and rules for using the scripting language are documented  
  1111.     in Chapter 7 of this manual, "Software Distribution Script Language." 
  1112.  
  1113. 7.  Choose the Compile button in the Script Editor window to compile the  
  1114.     script. 
  1115.  
  1116.     Refer to section 6.3 entitled "Compiling Scripts" for details on  
  1117.     compiling scripts. 
  1118.  
  1119. 8.  Choose the Save button in the Script Editor window. 
  1120.  
  1121.     The script contents are saved. 
  1122.  
  1123. 9.  Choose the Close button to close the Script Editor window. 
  1124.  
  1125.     The new script is added to the Scripts window.  Note that a script  
  1126.     must be compiled to be used in a package. 
  1127.  
  1128.  
  1129.  
  1130. 7.0 Software Distribution Script Language 
  1131.  
  1132. Chapter 6 discussed creating and managing scripts. This chapter lists the  
  1133. variables and rules for each function in the BrightWorks scripting language. 
  1134.  
  1135.  
  1136.  
  1137. 7.1 Introduction 
  1138.  
  1139. A script is a series of commands to be executed on a remote workstation.   
  1140. Scripts must be written according to a defined syntax, and they must be  
  1141. compiled successfully to be included in a package. 
  1142.  
  1143. The commands and instructions for using the BrightWorks software distribution  
  1144. scripting language are discussed in this chapter.  The procedures for  
  1145. creating, compiling and managing scripts are discussed in the Chapter 6  
  1146. entitled "Scripts." 
  1147.  
  1148. 7.1.1 What's in this Chapter 
  1149.  
  1150. The following chart describes the sections in this chapter: 
  1151.  
  1152. SECTION                         DESCRIPTION 
  1153. Notes on Syntax                 Discusses several items to note regarding  
  1154.                 the general format of the script language  
  1155.                 functions. 
  1156.  
  1157. Script Functions                Discusses the type of functions available,  
  1158.                 and summarizes their parameters and purpose. 
  1159.  
  1160. DOS Functions                   Lists each DOS function, providing the  
  1161.                 following: the function parameters, a  
  1162.                 description, tips for using the function,  
  1163.                 its return values and an example for using  
  1164.                 the function in a script. 
  1165.  
  1166. Easy System File Functions      Lists each Easy System File function,  
  1167.                 providing the same information as above. 
  1168.  
  1169. Windows System File Functions   Lists each Windows System File function,  
  1170.                 providing the same information as above. 
  1171.  
  1172. Miscellaneous Functions         Lists each Miscellaneous function, providing  
  1173.                 the same information as above. 
  1174.  
  1175. Rules and System Variables      Lists the allowable values for each  
  1176.                 parameter, and defines the variable rules. 
  1177.  
  1178. DOS Error Codes                 Lists the DOS error codes that can be  
  1179.                 returned from the script functions. 
  1180.  
  1181.  
  1182.                  
  1183. 7.2 Notes on Syntax 
  1184.  
  1185. The following items must be noted when writing scripts: 
  1186.  
  1187. o  Only one command can be placed on a line. 
  1188.  
  1189. o  The syntax for each command/function is as follows: 
  1190.  
  1191.     FUNC_NAME [parameter1], [parameter2], ...[parameterN] 
  1192.  
  1193. o  Unless otherwise noted, each function returns a 0 if it is successful  
  1194. (i.e., the system variable [retval] is set to 0).  The action to be taken  
  1195. as a result of a script's return code is defined when the script is  
  1196. included in a package.  These "Advanced Package Options" are discussed in  
  1197. Chapter 9.  
  1198.  
  1199. o  Some functions take "optional" parameters.  The administrator should 
  1200. decide whether or not to specify these parameters. If they  
  1201. are not specified, an empty or NULL value must be passed to the compiler to  
  1202. act as a placeholder. 
  1203.  
  1204. For example, the COPY function has the following parameters: 
  1205.  
  1206.     COPY [path] [filewild] [path] {filewild} 
  1207.      
  1208. where the last parameter, {filewild}, is optional.  The COPY command below  
  1209. provides an example for copying all .BAT files from the C: drive to the B:  
  1210. drive, using a placeholder to stand for the last {filewild} parameter:  
  1211.  
  1212.     COPY "C:\" "*.BAT" "B:\" ""  
  1213.  
  1214. In this example, the files are not renamed and retain their original .BAT  
  1215. extensions. 
  1216.  
  1217.  
  1218. 7.3 Script Functions 
  1219.  
  1220. Each script "command" is treated as a "function" (e.g., a C function) that  
  1221. has two basic properties:  
  1222.  
  1223. o  each command has 0 to 4 parameters that it will be passed 
  1224. o  most commands have a return code   
  1225.  
  1226. As such, the script language supports user defined variables (of integer  
  1227. and string type), as well as "system" variables.  When necessary, the  
  1228. functions also implement return values from the parameters that are passed. 
  1229.  
  1230. Each function has one or more parameters that can be passed.  In the  
  1231. following discussions, the required parameters are surrounded by [ ], and  
  1232. the optional parameters are surrounded by {  }.  Each parameter is the  
  1233. name of a rule, whose allowable values are listed later in this chapter. 
  1234.  
  1235. 7.3.1 Type of Functions 
  1236.  
  1237. The script functions are divided into the four major categories summarized  
  1238. below: 
  1239.  
  1240. DOS Functions (section 7.4): 
  1241. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1242. ATTRIB          [path] [filewild] [attribute]   Changes the attributes of a  
  1243.                         file or multiple files. 
  1244.  
  1245. COPY            [path] [filewild] [path]        Copies a file or files to  
  1246.         {filewild}                      another directory and file  
  1247.                         name(s). 
  1248.  
  1249. DELETEDIR       [path] [filename] {deleteopt}   Deletes a directory. 
  1250.  
  1251. DELETEFILE      [path] [filewild]               Deletes a file or multiple  
  1252.                         files. 
  1253. FINDFILE        [path] [filewild] [strvar]      Finds a file. 
  1254.  
  1255. MDIR            [path] [filename]               Creates a directory. 
  1256.  
  1257. RENAME          [path] [filewild] [path]        Renames a source file(s). 
  1258.         [filewild] 
  1259.  
  1260. UPGRADEOS       [upgopt]                        Upgrades DOS version from  
  1261.                         3.x-5.x to either 5.00  
  1262.                         or 6.00. 
  1263.  
  1264.  
  1265. Easy System File Functions (section 7.5): 
  1266.  
  1267. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1268. ADDDEVICE       [strvalue1] [strvalue2]         Adds a new DEVICE= line to a  
  1269.         [addopt]                        system file. 
  1270.  
  1271. ADDLINE         [strvalue1] [strvalue2]         Adds a line of text to a  
  1272.         [addopt]                        system file. 
  1273.  
  1274. ADDPATH         [strvalue1] [strvalue2]         Adds a sub-directory to a  
  1275.         [strvalue3] [addopt]            path environment variable. 
  1276.  
  1277. CFGGETVALUE     [strvalue] [intvar]             Gets a numeric variable from  
  1278.                         a system file. 
  1279.  
  1280. CFGSETVALUE     [strvalue] [intvalue]           Sets a numeric variable in a  
  1281.                         system file. 
  1282.                          
  1283. CFGGETSTRING    [strvalue] [strvar]             Gets a string variable from  
  1284.                         a system file. 
  1285.  
  1286. CFGSETSTRING    [strvalue1] [strvalue2]         Sets a string variable in a  
  1287.                         system file. 
  1288.  
  1289. REPLACEKEY      [strvalue1] [strvalue2]         Replaces a key value in a  
  1290.         [strvalue3]                     system file. 
  1291.  
  1292. REPLACELINE     [strvalue1] [strvalue2]         Replaces an existing line in  
  1293.                         a system file with a new line. 
  1294.  
  1295. REPLACELINE-ADD [strvalue1] [strvalue2]         Replaces or adds an existing  
  1296.         [addopt]                        line in a system file. 
  1297.  
  1298. SETSYSFILE      [path] [filename]               Sets a system file to be  
  1299.                         manipulated. 
  1300.  
  1301.  
  1302. Windows System File Functions (section 7.6): 
  1303.  
  1304. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1305. ADDGROUP        [strvalue]                      Creates a new Program Manager  
  1306.                         group. 
  1307.  
  1308. ADDITEM         [strvalue1] [strvalue2]         Adds a new item to a Program  
  1309.         [pathfile]                      Manager group. 
  1310.  
  1311. GETINIINT       [pathfile] [strvalue1]          Gets a key value (integer)  
  1312.         [strvalue2] [intvar]            from an INI file, and places  
  1313.                         the result in a variable. 
  1314.  
  1315. GETINISTR       [pathfile] [strvalue1]          Gets a key value (string)  
  1316.         [strvalue2] [strvar]            from an INI file, and places  
  1317.                         the result in a variable. 
  1318.  
  1319. SCHEDULEWIN     [path] [filename] [text]        Schedules a file to be run  
  1320.                         the next time the user runs  
  1321.                         Windows. 
  1322.  
  1323. WRITEINIINT     [pathfile] [strvalue1]          Writes a key value (integer)  
  1324.         [strvalue2] [intvalue]          to an INI file  
  1325.          
  1326. WRITEINISTR     [pathfile] [strvalue1]          Writes a key value (string)  
  1327.         [strvalue2] [strvalue3]         to an INI file. 
  1328.  
  1329.  
  1330. Miscellaneous Functions (section 7.7): 
  1331.  
  1332. FUNCTION        REQUIRED PARAMETERS             DESCRIPTION 
  1333. APPENDPATH      [strvar] [strvalue]             Appends the contents of a  
  1334.                         string value to the end of a  
  1335.                         string variable; however, it  
  1336.                         first checks if the last  
  1337.                         character of a string  
  1338.                         variable is a "\".  If it  
  1339.                         is not, APPENDPATH will  
  1340.                         append a "\" and a value to  
  1341.                         the variable. 
  1342.  
  1343. ASSIGN          [intvar] [intvalue]             Performs a basic integer  
  1344.                         assignment operation. 
  1345.  
  1346. DEFINE          [text] [defineopt]              Used to create user defined  
  1347.                         variables of a string or  
  1348.                         integer type. 
  1349.  
  1350. EXIT            [intvalue]                      Ends the script. 
  1351.  
  1352. IF..THEN..ELSE  [intvalue1] [condoper]          Allows conditional processing  
  1353.         [intvalue2]                     of functions. 
  1354.  
  1355. NUMTOSTR        [strvar] [intvalue]             Converts a numeric value to  
  1356.                         a string variable. 
  1357.  
  1358. PAUSE           [text]                          Pauses execution of the  
  1359.                         script until the user presses  
  1360.                         a key. 
  1361.  
  1362. REBOOT                                          Immediately reboots the  
  1363.                         user's PC. 
  1364.  
  1365. SHELL           [pathfile] {text}{shellopt}     Allows a user to execute an  
  1366.                         external DOS batch file or  
  1367.                         executable program. 
  1368.  
  1369. STRCAT          [strvar] [strvalue]             Appends the contents of a  
  1370.                         string value to the end of a  
  1371.                         string variable. 
  1372.  
  1373. STRCOMPARE      [strvar] [strvalue]             Does a byte for byte  
  1374.                         comparison of two strings. 
  1375.  
  1376. STRCOPY         [strvar] [strvalue]             Copies a value into a string,  
  1377.                         overwriting the previous  
  1378.                         contents of the string. 
  1379.  
  1380. WRITELN         [strvalue]                      Writes a string value  
  1381.                         (e.g., write to screen). 
  1382.  
  1383.  
  1384. NOTE:  In the actual script, parameters are separated by a space; do not  
  1385. type the brackets. 
  1386.  
  1387. 7.3.2 User-defined Variables 
  1388.  
  1389. User-defined variables are defined by using the DEFINE command (see  
  1390. Miscellaneous Functions) to create a string or integer user-defined  
  1391. variable name.   
  1392.  
  1393. User-defined variables must be defined before listing any script functions.   
  1394. Also, the appropriate type must be used when calling a function that allows  
  1395. user-defined variable names.  The functions that allow user-defined  
  1396. variables, system variables and literal text use the phrases [strvar]  
  1397. or [intvar] in their parameter listings.  Check the Rules discussion in 
  1398. section 7.7 entitled "Rules and System Variables" for further details. 
  1399.  
  1400.  
  1401. 7.4 DOS Functions 
  1402.  
  1403. The DOS function set is used for managing a machine's files and directories.   
  1404. For example, files can be searched for, copied, deleted, renamed and  
  1405. tagged with a specified attribute; directories can be created and deleted. 
  1406.  
  1407. Return values are generated when appropriate (unless otherwise noted, the  
  1408. functions return 0 if successful).  Any applicable system variables are  
  1409. also noted.   
  1410.  
  1411. Most DOS functions return a DOS error code if unsuccessful.  Refer to the  
  1412. table in section 7.8 entitled "DOS Error Codes" for a list of the DOS error  
  1413. codes that may be returned. 
  1414.  
  1415. NOTES: a - When an "explicit <path>" is mentioned, it can take the form  
  1416. of D:\PATH  (SERVER/VOLUME:\PATH is not currently supported). 
  1417. b -  Some functions take optional "options."  The administrator should 
  1418. decide whether or not to specify these options. 
  1419. c - In the following function specifications, parameters in quotes  
  1420. represent literal parameters; all other parameters represent rules.   
  1421. The rules are listed in section 7.7 entitled "Rules and System Variables." 
  1422.  
  1423. ATTRIB [path] [filewild] [attribute] 
  1424.  
  1425. Parameter       Description and Notes 
  1426. [path]          Source path to files. This path must exist. 
  1427.  
  1428. [filewild]      The file name whose attributes are to be changed. May  
  1429.         contain wildcards (? and *). 
  1430.  
  1431. [attribute]     RO -  Read only   
  1432.         RW - Read/Write 
  1433.         A -    Set Archive bit 
  1434.         SY -   System file 
  1435.         H -    Hidden file 
  1436.         SH -  Shareable (network <path> only) 
  1437.         -A -   Turn off archive attribute 
  1438.         -SY - Turn off system attribute 
  1439.         -H -   Turn off hidden attribute 
  1440.         -SH - Turn off shareable attribute (network <path> only) 
  1441.  
  1442.  
  1443. Description - Changes the attributes of a file or multiple files. 
  1444.  
  1445. Tip - To remove the Read Only attribute, use the RW attribute.   
  1446. (There is no -RO attribute.) 
  1447.  
  1448. Return Values: 
  1449.  
  1450. [RETVAL] = 0 if successful 
  1451.  
  1452. [RETVAL] = -1 if the SH or -SH attributes are used and the drive letter  
  1453. specified in [PATH] is not a network drive 
  1454.  
  1455. [RETVAL] = -2 if the SH or -SH attributes are used and no drive letter is  
  1456. specified in [PATH] 
  1457.  
  1458. [RETVAL] = DOS error code in all other cases 
  1459.  
  1460. Example -  Set the AUTOEXEC.BAT file on a user's boot drive to Read Only: 
  1461.  
  1462.     ATTRIB [BOOT_ROOT] "AUTOEXEC.BAT" RO 
  1463.  
  1464.  
  1465. COPY [path] [filewild] [path] {filewild} 
  1466.  
  1467. Parameter       Description and Notes 
  1468. [path]          Source path of file to be copied. 
  1469.  
  1470. [filewild]      Source file name to be copied. 
  1471.         May contain standard DOS wild cards (? and *). 
  1472.  
  1473. [path]          Destination path. 
  1474.  
  1475. {filewild}      Optional destination file name.  (If not specified, *.*  
  1476.         is assumed.) 
  1477.         May contain standard DOS wild cards (? and *). May be used  
  1478.         to rename file(s) during file copy.  If not used,  
  1479.         the placeholder "" or NULL must be specified. 
  1480.  
  1481.  
  1482. Description - Copies a file or files to another directory and file name(s). 
  1483.  
  1484. Return Values: 
  1485.  
  1486. [RETVAL] = 0 if file(s) are copied correctly 
  1487. [RETVAL] = DOS error code if the function is unsuccessful 
  1488.  
  1489. Example - Copy the WIN.INI file from the Windows directory found at login  
  1490. to the local Windows directory.  Two examples of this are: 
  1491.  
  1492. COPY [WINDIR] "WIN.INI" "C:\WINDOWS" ""  
  1493.  
  1494.                  or 
  1495.  
  1496. COPY [WINDIR] "WIN.INI" "C:\WINDOWS" NULL 
  1497.  
  1498.  
  1499. DELETEDIR [path] [filename] {deleteopt} 
  1500.  
  1501. Parameter       Description and Notes 
  1502. [path]          Source path to the directory to be deleted. This path  
  1503.         must exist. 
  1504.  
  1505. [filename]      Directory name to be deleted. 
  1506.  
  1507. {deleteopt}     Optional delete option: ALL - causes DELETEDIR to delete  
  1508.         the specified directory and everything under it, including  
  1509.         any subdirectories, hidden, system and read only files. If  
  1510.         not used, NULL must be specified. 
  1511.  
  1512.  
  1513. Description - Deletes a directory. 
  1514.  
  1515. Tip - Use the ALL delete option with caution since it can delete entire  
  1516. directory trees. 
  1517.  
  1518. Return Values: 
  1519.  
  1520. [RETVAL] = 0 if the directory is successfully deleted 
  1521. [RETVAL] = DOS error code if the function is unsuccessful 
  1522.  
  1523. Example - Delete the Windows directory found at login and all of its files  
  1524. and sub-directories: 
  1525.  
  1526.     DELETEDIR [WINDIR] ALL 
  1527.  
  1528.  
  1529.  
  1530. DELETEFILE [path] [filewild] 
  1531.  
  1532. Parameter       Description and Notes 
  1533. [path]          Source path to the file(s) to be deleted. This path  
  1534.         must exist. 
  1535.  
  1536. [filewild]      File name(s) to be deleted.  Wild cards may be  
  1537.         specified (? and *) to delete multiple files. 
  1538.  
  1539.          
  1540. Description - Deletes a file or multiple files. 
  1541.  
  1542. Return Values: 
  1543.  
  1544. [RETVAL] = 0 if the file(s) are deleted 
  1545. [RETVAL] = DOS error code if the function is unsuccessful 
  1546.  
  1547. Example - Delete all .DOC files from the F:\UZR\JOHN sub-directory: 
  1548.  
  1549.     DELETEFILE "F:\UZR\JOHN" "*.DOC" 
  1550.  
  1551.  
  1552.  
  1553. FINDFILE [path] [filewild] [strvar] 
  1554.  
  1555. Parameter       Description and Notes 
  1556. [path]          Source path in which to search for files.  This path  
  1557.         must exist. 
  1558.  
  1559. [filewild]      The search criteria. May contain wildcards (? and *). 
  1560.  
  1561. [strvar]        A string variable which contains the file name of the  
  1562.         first file found.  (Before being used as a parameter,  
  1563.         this variable must be defined using the DEFINE function.) 
  1564.  
  1565.  
  1566. Description - Finds a file. 
  1567.  
  1568. Return Values: 
  1569.  
  1570. [RETVAL] = 0 and copies the name of the first file found into [STRVAL]  
  1571. if successful 
  1572. [RETVAL] = -1 and sets [STRVAL] to NULL if no files are found 
  1573.  
  1574. Example -  Test for the presence of the NET.CFG file in the [NET.CFG]  
  1575. directory: 
  1576.  
  1577.     DEFINE "Result" STRING 
  1578.     FINDFILE [NETCFG] "NET.CFG" RESULT 
  1579.  
  1580.  
  1581. MDIR [path] [filename] 
  1582.  
  1583. Parameter       Description and Notes 
  1584. [path]          Path in which to create the new directory. This path  
  1585.         must exist. 
  1586.  
  1587. [filename]      Sub-directory to create. Wild cards may not be specified. 
  1588.  
  1589.  
  1590. Description - Creates a directory. 
  1591.  
  1592. Return Values: 
  1593.  
  1594. [RETVAL] = 0 if the directory is successfully created 
  1595. [RETVAL] = DOS error code if the function is unsuccessful 
  1596.  
  1597. Example - Create the JOHN sub-directory in the UZR directory: 
  1598.  
  1599.     MDIR "F:\UZR" "JOHN" 
  1600.  
  1601.  
  1602.  
  1603. RENAME [path] [filewild] [path] [filewild] 
  1604.  
  1605. Parameter       Description and Notes 
  1606. [path]          Source path to files to be renamed. This path must exist. 
  1607.  
  1608. [filewild]      Source file name to be renamed. May contain wildcards  
  1609.         (? and *). 
  1610.  
  1611. [path]          Destination path (can be different than [path] to enable  
  1612.         moving files, but the drives must be the same). 
  1613.  
  1614. [filewild]      New file name.  May contain wildcards (? and *).   
  1615.         If so, the standards used by the DOS REN command are followed. 
  1616.  
  1617.  
  1618. Description - Renames a source file(s). 
  1619.  
  1620. Return Values: 
  1621.  
  1622. [RETVAL] = 0 if successful 
  1623. [RETVAL] = DOS error code in all other cases 
  1624.  
  1625. Example -  Rename all .BAT files in the C:\ drive to .BAK: 
  1626.  
  1627.     RENAME "C:\" "*.BAT" "C:\" "*.BAK" 
  1628.  
  1629.  
  1630.  
  1631. UPGRADEOS [upgopt] 
  1632.  
  1633. Parameter       Description and Notes 
  1634. [upgopt]        5.00 - upgrade DOS version to 5.00 
  1635.         6.00 - upgrade DOS version to 6.00 
  1636.  
  1637.  
  1638. Description - Upgrades DOS version from 3.x-5x to either 5.00 or 6.00. 
  1639.  
  1640. Tips: 
  1641. 1) In order for BrightWorks to have access to the upgraded DOS files,  
  1642. EQUIP must first be run on a machine that has the desired DOS files.   
  1643. For example, to upgrade a machine's DOS version to 6.00, EQUIP first must  
  1644. be executed on a machine that has DOS 6.00.  By executing EQUIP from the  
  1645. same directory in which the BrightWorks software distribution update  
  1646. program (SDUPDATE.EXE) file is located, the DOS files become accessible  
  1647. by BrightWorks.  Note also that the machine on which EQUIP is run must  
  1648. not contain any system that modifies the machine's boot record  
  1649. (e.g., OS/2, Windows NT). 
  1650.  
  1651. NOTE:  Do not use this function on a workstation that has Windows NT  
  1652. installed in a dual boot configuration.  It will cause the boot menu to be  
  1653. lost.  The PC will boot DOS only. 
  1654.  
  1655. 2) The machine must be rebooted after the script is executed.  Use the  
  1656. REBOOT function as the last script function. 
  1657.  
  1658. Return Values: 
  1659.  
  1660. [RETVAL] = 0 if successful 
  1661. [RETVAL] = DOS error code in all other cases 
  1662.  
  1663. Example -  Upgrade a user's DOS version to 5.00: 
  1664.  
  1665.     UPGRADEOS 5.00 
  1666.     IF [RETVAL]=0 
  1667.         ... 
  1668.         ; copy DOS files, edit CONFIG.SYS, etc. 
  1669.         REBOOT 
  1670.     ENDIF 
  1671.  
  1672.  
  1673.  
  1674. 7.5 Easy System File Functions 
  1675.  
  1676. The Easy System File functions allow for easy manipulation of basic  
  1677. system files, such as CONFIG.SYS, AUTOEXEC.BAT, NET.CFG, or a login script.   
  1678. (Use the Windows System File functions to edit .INI files.) 
  1679.  
  1680. Most Easy System File functions return a DOS error code if unsuccessful.   
  1681. Refer to the table in section 7.8 entitled "DOS Error Codes" for a list of  
  1682. the DOS error codes that may be returned. 
  1683.  
  1684. NOTE:  Prior to using any of the functions in this category, you must call  
  1685. SETSYSFILE.  Also, none of the functions will create a backup of the file  
  1686. that they are modifying; however, a file will not be modified if a function  
  1687. fails.  It is your responsibility to backup any file as necessary. 
  1688.  
  1689. All of the Easy System File functions make use of a "key" value.  This  
  1690. value is used to search the file to aid in determining where to make a  
  1691. modification.  All key searches are case insensitive.  If a key is found,  
  1692. its corresponding value is defined as the first non- whitespace (e.g. tab,  
  1693. cr/lf, =, etc.) group of characters after the found key value.   
  1694. For example, consider the following line: 
  1695.  
  1696.     PATH=C:\DOS;C:\WINDOWS 
  1697.  
  1698. If "PATH" is specified as the key, then the corresponding value is  
  1699. "C:\DOS;C:\WINDOWS."  However, consider the following line: 
  1700.  
  1701.     STACKS 9,256 
  1702.  
  1703. If "STACKS" is specified as the key, then the corresponding value is "9,256."   
  1704. As a result, an equal sign is not necessary to identify a value that  
  1705. you might want to edit. 
  1706.  
  1707. NOTE:  In the following function specifications, parameters in quotes  
  1708. represent literal parameters; all other parameters represent rules.  The  
  1709. rules are listed later in this chapter. 
  1710.  
  1711.  
  1712. ADDDEVICE [strvalue1] [strvalue2] [addopt] 
  1713.  
  1714. Parameter       Description and Notes 
  1715. [strvalue1]     The path and driver name (e.g. C:\WINDOWS\EMM386.EXE). 
  1716.  
  1717. [strvalue2]     The key value to search for (e.g. HIMEM.SYS). 
  1718.  
  1719. [addopt]        Where [strvalue1] is to be placed: either BEFORE or AFTER  
  1720.         [strvalue2]. 
  1721.  
  1722.  
  1723. Description - Adds a new DEVICE= line to a system file (typically the  
  1724. DOS CONFIG.SYS). 
  1725.  
  1726. Tip - If [strvalue2] is a null string or the key is not found, ADDDEVICE  
  1727. will add [strvalue1] in the position of the file indicated by [addopt]. 
  1728.  
  1729. Return Values: 
  1730.  
  1731. [RETVAL] = 0 if successful 
  1732. [RETVAL] = DOS error code in all other cases 
  1733.  
  1734. Example - Place "DEVICE=C:\WINDOWS\EMM386.EXE" after the "DEVICE=HIMEM.SYS"  
  1735. line in the CONFIG.SYS file: 
  1736.  
  1737.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1738.     ADDDEVICE "C:\WINDOWS\EMM386.EXE" "HIMEM.SYS" AFTER 
  1739.      
  1740.  
  1741. ADDLINE [strvalue1] [strvalue2] [addopt] 
  1742.  
  1743. Parameter       Description and Notes 
  1744. [strvalue1]     The entire line of text you wish to add. 
  1745.  
  1746. [strvalue2]     A reference key value to be positioned relative to  
  1747.         [strvalue1].  This is a "keyword" that will be searched  
  1748.         for in the file.  Specify as much or as little as you like.   
  1749.         When the first occurrence of the keyword in a line is found,  
  1750.         that line is used as the reference. 
  1751.  
  1752. [addopt]        Specify where [strvalue1] is to be placed: either BEFORE or  
  1753.         AFTER [strvalue2]. 
  1754.  
  1755.  
  1756. Description - Adds a line of text to a system file. 
  1757.  
  1758. Tip - If [strvalue2] is a null string, ADDLINE will place [strvalue1] in  
  1759. the position of the file indicated by [addopt]. 
  1760.  
  1761. Return Values: 
  1762.  
  1763. [RETVAL] = 0 if successful 
  1764. [RETVAL] = DOS error code in all other cases 
  1765.  
  1766. Example -  Add a new line to the end of a user's CONFIG.SYS file: 
  1767.  
  1768.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1769.     ADDLINE "THIS IS NEW.." "" AFTER 
  1770.  
  1771. NOTE:  As in the example above, non-specified parameters  
  1772. (e.g., [strvalue2]) can be indicated by empty quotes.  Entering NULL  
  1773. with no quotes is also acceptable. 
  1774.  
  1775.  
  1776.  
  1777. ADDPATH [strvalue1] [strvalue2] [strvalue3] [addopt] 
  1778.  
  1779. Parameter       Description and Notes 
  1780. [strvalue1]     The name of the path environment variable to edit (PATH for  
  1781.         DOS, or DPATH for OS/2, or TEMP, etc). 
  1782.  
  1783. [strvalue2]     The sub-directory to be added. 
  1784.  
  1785. [strvalue3]     The sub-directory that [strvalue2] will be placed either  
  1786.         before or after. 
  1787.  
  1788. [addopt]        Specify where [strvalue2] is to be placed: either BEFORE  
  1789.         or AFTER [strvalue3]. 
  1790.  
  1791.  
  1792. Description - Adds a sub-directory to a path environment variable. 
  1793.  
  1794. Tips: 
  1795.  
  1796. 1) If [strvalue3] is a null string, ADDPATH will place [strvalue2] in the  
  1797. position of the path statement indicated by [addopt] (i.e., the new path  
  1798. will be placed at the beginning or end of the path statement).  
  1799.  
  1800. 2) If the key specified in [strvalue1] is not found, then a new one is  
  1801. added, with a "SET" prepended.  This allows for adding path like environment  
  1802. variables such as "SET TEMP=", and so on.  
  1803.  
  1804. 3) This function can also be used to edit other lines such as a TEMP  
  1805. environment variable, or any other line that does something like  
  1806. "SET envvar=d:\path." 
  1807.  
  1808. Return Values: 
  1809.  
  1810. [RETVAL] = 0 if successful 
  1811. [RETVAL] = DOS error code in all other cases 
  1812.  
  1813. Example -  Add the sub-directory WINDOWS to the path and place it before  
  1814. the DOS variable in the AUTOEXEC.BAT file: 
  1815.  
  1816.     SETSYSFILE "C:\" "AUTOEXEC.BAT" 
  1817.     ADDPATH "PATH" "C:\WINDOWS" "C:\DOS" BEFORE 
  1818.  
  1819.  
  1820.  
  1821. CFGGETVALUE [strvalue] [intvar] 
  1822.  
  1823. Parameter       Description and Notes 
  1824. [strvalue]      The variable to be retrieved. 
  1825.  
  1826. [intvar]        An integer variable to hold the retrieved value.   
  1827.         (Before being used as a parameter, this variable must  
  1828.         be defined using the DEFINE function.) 
  1829.  
  1830.  
  1831. Description - Gets a numeric variable from a system file (e.g., FILES,  
  1832. BUFFERS, etc.). 
  1833.  
  1834. Tip - If the value of the key specified is non-numeric (e.g., the DOS=HIGH),  
  1835. CFGGETVALUE sets parameter 2 to 0, but does not return an error code.   
  1836. Use CFGGETSTRING to get a string value. 
  1837.  
  1838. Return Values: 
  1839.  
  1840. [RETVAL] = 0 if successful 
  1841. [RETVAL] = -2 if the key value could not be found 
  1842. [RETVAL] = DOS error code in all other cases 
  1843.  
  1844. Example - Place the value of the FILES= statement in the CONFIG.SYS file  
  1845. into a user defined variable called nRESULT (which must first be defined!): 
  1846.  
  1847.     DEFINE "nRESULT" STRING 
  1848.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1849.     CFGGETVALUE "FILES" nRESULT 
  1850.  
  1851.  
  1852.  
  1853. CFGSETVALUE [strvalue] [intvalue] 
  1854.  
  1855. Parameter       Description and Notes 
  1856. [strvalue]      The variable to be set. 
  1857.  
  1858. [intvalue]      The integer value. 
  1859.  
  1860.  
  1861. Description - Sets a numeric variable in a system file (e.g., FILES,  
  1862. BUFFERS, etc.). 
  1863.  
  1864. Tip: Use ADDLINE to add a new statement if one does not exist. 
  1865.  
  1866. Return Values: 
  1867.  
  1868. [RETVAL] = 0 if successful 
  1869. [RETVAL] = -2 if the key value could not be found 
  1870. [RETVAL] = DOS error code in all other cases 
  1871.  
  1872. Example - Set the value of the FILES= statement in the CONFIG.SYS file to 50,  
  1873. provided a FILES= statement already exists in the file: 
  1874.  
  1875.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1876.     CFGSETVALUE "FILES" 50 
  1877.     CFGGETSTRING [strvalue] [strvar] 
  1878.     CFGSETSTRING [strvalue1] [strvalue2] 
  1879.  
  1880. These two functions act exactly the same as CFG???VALUE, except they deal  
  1881. with string values rather than integer values.  An administrator might use  
  1882. this to check non-numeric variables (e.g., STACKS=9,256 is a non numeric  
  1883. value). 
  1884.  
  1885. Note that before using the [strvar] variable as a parameter, the variable  
  1886. must be defined using the DEFINE function. 
  1887.  
  1888.  
  1889.  
  1890. REPLACEKEY [strvalue1] [strvalue2] [strvalue3] 
  1891.  
  1892. Parameter       Description and Notes 
  1893. [strvalue1]     The line in the system file which contains the key value  
  1894.         to be replaced. 
  1895.  
  1896. [strvalue2]     The key value to be replaced. 
  1897.  
  1898. [strvalue3]     The new value. 
  1899.  
  1900.  
  1901. Description - Similar to REPLACELINE; however, it replaces a key value  
  1902. rather than the entire line. 
  1903.  
  1904. Tip - If [strvalue3] is a null string, [strvalue2] will be removed. 
  1905.  
  1906. Return Values: 
  1907.  
  1908. [RETVAL] = 0 if successful 
  1909. [RETVAL] = DOS error code in all other cases 
  1910.  
  1911. Example -  Change the "40" to a "50" in the FILES= line in the CONFIG.SYS  
  1912. file: 
  1913.  
  1914.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1915.     REPLACEKEY "FILES=40" "40" "50" 
  1916.  
  1917.  
  1918.  
  1919. REPLACELINE [strvalue1] [strvalue2] 
  1920.  
  1921. Parameter       Description and Notes 
  1922. [strvalue1]     The key value of the line you wish to replace, such as PATH,  
  1923.         COMSPEC or DEVICE. 
  1924.  
  1925. [strvalue2]     The new value of the entire line. 
  1926.  
  1927.  
  1928. Description - Replaces an existing line in a system file with a new line. 
  1929.  
  1930. Tips: 
  1931.  
  1932. 1) If [strvalue2] is a null string, then the line will be deleted. 
  1933.  
  1934. 2) If the key value exists more than one time in the file, only the first  
  1935. instance is modified.  
  1936.  
  1937. Return Values: 
  1938.  
  1939. [RETVAL] = 0 if successful 
  1940. [RETVAL] = DOS error code in all other cases 
  1941.  
  1942. Example - Replace the existing COMSPEC line in the CONFIG.SYS file with a  
  1943. new line: 
  1944.  
  1945.     SETSYSFILE "C:\" "CONFIG.SYS" 
  1946.     REPLACELINE "COMSPEC" "SET COMSPEC=C:\DRDOS\COMMAND.COM" 
  1947.      
  1948.  
  1949. REPLACELINEADD [strvalue1] [strvalue2] [addopt] 
  1950.  
  1951. Parameter       Description and Notes 
  1952. [strvalue1]     The key value of the line you wish to replace, such as PATH,  
  1953.         COMSPEC or DEVICE. 
  1954.  
  1955. [strvalue2]     The new value of the entire line. 
  1956.  
  1957. [addopt]        Where [strvalue1] is to be placed: either BEFORE or AFTER  
  1958.         [strvalue2]. 
  1959.  
  1960.  
  1961. Description - Similar to REPLACELINE, this function replaces an existing  
  1962. line in a system file with a new line.  However, if the key specified in  
  1963. [strvalue1] is not found, then the line specified in [strvalue2] is added  
  1964. to the file, at the beginning or end of the file depending on the position  
  1965. defined by [addopt]. 
  1966.  
  1967. Tip: If [strvalue1] is not found, then the line specified as [strvalue2]  
  1968. will be added to the file in the position defined by [addopt]. 
  1969.  
  1970. Return Values: 
  1971.  
  1972. [RETVAL] = 0 if successful 
  1973. [RETVAL] = DOS error code in all other cases 
  1974.  
  1975. Example - Replace the existing NETX line with the new line C:\NET\VLM.   
  1976. If NETX is not found, then the line will be appended to the end of the file: 
  1977.  
  1978.     SETSYSFILE "C:\" "NET.BAT" 
  1979.     REPLACELINEADD "NETX" "C:\NET\VLM" AFTER 
  1980.  
  1981.  
  1982.  
  1983. SETSYSFILE [path] [filename] 
  1984.  
  1985. Parameter       Description and Notes 
  1986. [path]          The path to the file to be modified.  
  1987.  
  1988. [filename]      The name of the file to be modified. 
  1989.  
  1990.  
  1991. Description - Sets a system file to be manipulated. 
  1992.  
  1993. Tips: 
  1994.  
  1995. 1) This function must be called prior to calling any of the functions in  
  1996. the Easy System File function category.  It needs to be called only once,  
  1997. unless you change the file you are working on in the script. 
  1998.  
  1999. 2) Using [BOOT_ROOT] as the [path] parameter will always modify the file on  
  2000. the boot disk, regardless of whether or not the user is given the option to  
  2001. override the installation path (in the package definition).  Use [TARGET]  
  2002. as the [path] parameter if the user is given the option to override the  
  2003. installation path. 
  2004.  
  2005. Return Values: 
  2006.  
  2007. [RETVAL] = 0 if file is found 
  2008. [RETVAL] = 2 if file is not found 
  2009.  
  2010. Example -  Designate a user's CONFIG.SYS file as the file to be edited.   
  2011. Two examples of this are: 
  2012.  
  2013.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2014.     or 
  2015.     SETSYSFILE [BOOT_ROOT] "CONFIG.SYS" 
  2016.  
  2017.  
  2018. 7.6 Windows System File Functions 
  2019.  
  2020. The Windows System File functions provide the ability to edit INI files  
  2021. and create and manipulate Program Manager groups. 
  2022.  
  2023. NOTES:  a - In the following function specifications, parameters in  
  2024. quotes represent literal parameters; all other parameters represent rules.   
  2025. The rules are listed in section 7.8 entitled "DOS Error Codes." 
  2026. b - Many of the Windows System File functions have a [pathfile] parameter  
  2027. which specifies the path name and file name to an INI file.  If you do  
  2028. not specify a full path to the Windows directory, then the actions  
  2029. performed by these functions occur on the first instance of Windows found,  
  2030. as determined by the path statement of the receiving machine.  If Windows  
  2031. is not found in the path, then the distribution update program will search  
  2032. for the INI file in [BOOT_ROOT]\WINDOWS.  If Windows is still not found,  
  2033. the update program will then try [BOOT_ROOT]\WIN31. 
  2034. c - The functions ADDGROUP, ADDITEM, and SCHEDULEWIN use the WSDUPD.EXE  
  2035. update program which is copied into the local Windows directory each  
  2036. time these functions are used.  The next time the user runs Windows,  
  2037. WSDUPD.EXE runs and executes the appropriate function(s).  It then deletes  
  2038. WSDUPD.EXE and WSDUPD.INI.  If a user has SHARE.EXE loaded, a  
  2039. "sharing violation" message will display when trying to delete WSDUPD.EXE.   
  2040. This message can be ignored. 
  2041.  
  2042.  
  2043. ADDGROUP [strvalue]   
  2044.  
  2045. Parameter       Description and Notes 
  2046. [strvalue]      The string which specifies the name of the Program Manager  
  2047.         group to be added. 
  2048.  
  2049.  
  2050. Description - Creates a new Program Manager group. 
  2051.  
  2052. Tip: When the ADDGROUP script function is executed, the BrightWorks  
  2053. software distribution update program WSDUPD.EXE is automatically copied  
  2054. into the workstation's Windows directory.  The WSDUPD.EXE command is also  
  2055. added to the "Load=" line in the WIN.INI file.  The next time Windows is  
  2056. run at the workstation, the function is executed and WSDUPD.EXE is removed  
  2057. from the WIN.INI "Load=" line. 
  2058.  
  2059. Return Values: 
  2060.  
  2061. [RETVAL] = 0 if successful 
  2062. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2063. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2064. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2065.  
  2066. Example -  Create a Program Manager group named COMPANY: 
  2067.  
  2068.     ADDGROUP "COMPANY" 
  2069.  
  2070. NOTE:  This function can be used with any third party shell program which  
  2071. emulates the Program Manager DDE interface. 
  2072.  
  2073.  
  2074.  
  2075. ADDITEM [strvalue1] [strvalue2] [pathfile]  
  2076.  
  2077. Parameter       Description and Notes 
  2078. [strvalue1]     The group to which the item will be added. 
  2079.  
  2080. [strvalue2]     The name of the new item. 
  2081.  
  2082. [pathfile]      The .EXE file to be associated with the new item. 
  2083.  
  2084.  
  2085. Description - Adds a new item to a Program Manager group. 
  2086.  
  2087. Tip: When the ADDITEM script function is executed, the BrightWorks  
  2088. software distribution update program WSDUPD.EXE is automatically copied  
  2089. into the workstation's Windows directory.  The WSDUPD.EXE command is  
  2090. also added to the "Load=" line in the WIN.INI file.  The next time  
  2091. Windows is run at the workstation, the function is executed and WSDUPD.EXE  
  2092. is removed from the WIN.INI "Load=" line. 
  2093.  
  2094. Return Values: 
  2095.  
  2096. [RETVAL] = 0 if successful 
  2097. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2098. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2099. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2100.  
  2101. Example -  Create a Program Manager group named APPS, and then create a  
  2102. program icon within the new APPS group named EXCEL: 
  2103.  
  2104.     ADDGROUP "APPS" 
  2105.     ADDITEM "APPS" "EXCEL" "U:\MS\EXCEL\EXCEL.EXE" 
  2106.  
  2107. NOTE:  This function can be used with any third party shell program which  
  2108. emulates the Program Manager DDE interface. 
  2109. Also note that the path specified will appear in the command line as well as 
  2110. the working directory. The above EXCEL example demonstrates this. 
  2111.  
  2112.  
  2113.  
  2114. GETINIINT [pathfile] [strvalue1] [strvalue2] [intvar] 
  2115.  
  2116. This function works in exactly the same way as GETINISTR (below) except  
  2117. it is used to retrieve integer values from INI files. 
  2118.  
  2119.  
  2120.  
  2121. GETINISTR [pathfile] [strvalue1] [strvalue2] [strvar] 
  2122.  
  2123. Parameter       Description and Notes 
  2124. [pathfile]      The path and file name of the INI file. 
  2125.  
  2126. [strvalue1]     The section of the INI file in which the entry is located  
  2127.         (e.g., [386Enh]). 
  2128.  
  2129. [strvalue2]     The entry whose associated string is to be retrieved  
  2130.         (e.g., keyboard.drv=, however, do not include the = sign!). 
  2131.  
  2132. [strvar]        Variable in which to place the found string.  (Before being  
  2133.         used as a parameter, this variable must be defined using  
  2134.         the DEFINE function.) 
  2135.  
  2136.  
  2137. Description - Gets a key value (string) from an INI file, and places the  
  2138. result in a variable. 
  2139.  
  2140. Tip - If [strvalue2] is a null string or the key is not found, ADDDEVICE  
  2141. will add [strvalue1] in the position of the file indicated by [addopt]. 
  2142.  
  2143. Return Values: 
  2144.  
  2145. [RETVAL] = 0 if successful 
  2146. [RETVAL] = -1 if the [strvalue2]  section name does not exist 
  2147. [RETVAL] = -2 if the [strvalue3]  key does not exist 
  2148. [RETVAL] = DOS error code in all other cases 
  2149.  
  2150. Example -  Determine whether Windows version 3.1 is installed at a  
  2151. workstation by looking at the CONTROL.INI file:  
  2152.  
  2153.     DEFINE "VER" STRING 
  2154.     GETINISTR "C:\WIN\CONTROL.INI" "[INSTALLED]" "3.1" VER 
  2155.  
  2156.  
  2157.  
  2158. SCHEDULEWIN [path] [filename] [text] 
  2159.  
  2160. Parameter       Description and Notes 
  2161. [path]          The path to the file to be run. 
  2162.  
  2163. [filename]      The file name to be run upon Windows execution. 
  2164.  
  2165. [text]          Optional command line arguments for the file. 
  2166.  
  2167.  
  2168. Description - Schedules a file to be run the next time the user runs Windows. 
  2169.  
  2170. Tip - This function could be used to automate the installation of a  
  2171. Windows program if a macro playback utility is used. 
  2172.  
  2173. Return Values: 
  2174.  
  2175. [RETVAL] = 0 if successful 
  2176. [RETVAL] = DOS error code if unsuccessful.  The function might fail if  
  2177. WSDUPD.EXE could not be copied into the Windows directory or if the  
  2178. WSDUPD.EXE control file (WSDUPD.INI) could not be created. 
  2179.  
  2180. Example -  Schedule the Notepad program to run the next time Windows is run,  
  2181. and also open the README.TXT notepad file: 
  2182.  
  2183.     SCHEDULEWIN "C:\WINDOWS" "NOTEPAD.EXE" "README.TXT" 
  2184.      
  2185.      
  2186. WRITEINIINT [pathfile] [strvalue1] [strvalue2] [intvalue] 
  2187.  
  2188. This function works exactly like WRITEINISTR (below), except that it is  
  2189. used to write an integer value to an INI file. 
  2190.  
  2191.  
  2192. WRITEINISTR [pathfile] [strvalue1] [strvalue2] [strvalue3] 
  2193.  
  2194. Parameter       Description and Notes 
  2195. [pathfile]      The path and file name of the INI file. 
  2196.  
  2197. [strvalue1]     The section in which [strvalue2] is located (e.g., [386Enh]). 
  2198.  
  2199. [strvalue2]     The entry whose associated string is to be modified  
  2200.         (e.g., keyboard.drv=, however, don't include the = sign!). 
  2201.  
  2202. [strvalue3]     The string to be written to the INI file. 
  2203.  
  2204.  
  2205. Description - Gets a key value (string) from an INI file, and writes the  
  2206. result to the INI file. 
  2207.  
  2208. Tips: 
  2209.  
  2210. 1) If the section name specified in [strvalue1] is not found, then it will  
  2211. be added to the end of the INI file, with a new key=value added in that  
  2212. section. 
  2213.  
  2214. 2) If the [strvalue1] section is found but the key value specified in  
  2215. [strvalue2] is not found, the new key value is added directly after the  
  2216. section name [strvalue1]. 
  2217.  
  2218. Return Values: 
  2219.  
  2220. [RETVAL] = 0 if successful 
  2221. [RETVAL] = DOS error code in all other cases 
  2222.  
  2223. Example -  Define a "medium priority" in the [SPOOLER] section of the  
  2224. WIN.INI file:  
  2225.  
  2226.     WRITEINISTR "C:\WIN\WIN.INI" "[SPOOLER]" "PRIORITY" "MEDIUM" 
  2227.  
  2228.  
  2229.  
  2230. 7.7 Miscellaneous Functions 
  2231.  
  2232. The Miscellaneous Functions include basic functions for defining, assigning,  
  2233. copying, comparing and concatenating variables. 
  2234.  
  2235. NOTE:  In the following function specifications, parameters in quotes  
  2236. represent literal parameters; all other parameters represent rules.   
  2237. The rules are listed in section 7.8 entitled "DOS Error Codes."  
  2238.  
  2239.  
  2240. APPENDPATH [strvar] [strvalue] 
  2241.  
  2242. Parameter       Description and Notes 
  2243. [strvar]        The variable to contain the appended string  
  2244.         (i.e., destination).  (Before being used as a parameter,  
  2245.         this variable must be defined using the DEFINE function.) 
  2246.  
  2247. [strvalue]      The string value to be appended (i.e., source). 
  2248.  
  2249.  
  2250. Description - Adds a file name to a path or builds a path.  This function  
  2251. acts the same way as STRCAT, except that it will check if the last  
  2252. character of [strvar] is a "\".  If it is not, APPENDPATH will append  
  2253. a "\" to [strvar], and then [strvalue] will be appended.  This is very  
  2254. useful (and necessary!) in building paths. 
  2255.  
  2256. Return Value: 
  2257.  
  2258. [RETVAL] = 0 always 
  2259.  
  2260. Example - Define the variable named PATH to be a string-type.  Copy the  
  2261. location of the network configuration files into the PATH variable and  
  2262. then append it to the C:\DRIVERS directory. 
  2263.  
  2264.     DEFINE "PATH" STRING 
  2265.     STRCOPY PATH [NETCFG] 
  2266.     APPENDPATH "C:\DRIVERS" PATH 
  2267.  
  2268.  
  2269.  
  2270. ASSIGN [intvar] [intvalue] 
  2271.  
  2272. Parameter       Description and Notes 
  2273. [intvar]        The integer type variable name which will be assigned a  
  2274.         value.  (Before being used as a parameter, this variable  
  2275.         must be defined using the DEFINE function.) 
  2276.          
  2277. [intvalue]      The numeric value to be assigned to the integer type variable. 
  2278.  
  2279.  
  2280. Description - Performs a basic integer assignment operation (e.g., a = b). 
  2281.  
  2282. Return Value: 
  2283.  
  2284. [RETVAL] = 0 always 
  2285.  
  2286. Example -  Define the variable "NUM" as an integer type, and later assign  
  2287. 33 to the variable NUM:  
  2288.  
  2289.     DEFINE "NUM" INTEGER 
  2290.     ASSIGN NUM 33 
  2291.  
  2292.  
  2293.  
  2294. DEFINE [text] [defineopt] 
  2295.  
  2296. Parameter       Description and Notes 
  2297. [text]          The variable being defined. 
  2298.  
  2299. [defineopt]     The type of variable being defined (e.g., STRING or INTEGER). 
  2300.  
  2301.  
  2302. Description - Used to create user defined variables of a string or integer  
  2303. type.  This variable can then be used later in the script. 
  2304.  
  2305. Tips: 
  2306. 1) All DEFINE statements must be declared before any script command  
  2307. is executed. 
  2308.  
  2309. 2)  If a STRING type variable is declared, the login module will allocate  
  2310. 255 bytes (= 255 characters) of memory for the string.  If an INTEGER  
  2311. type variable is declared, the login module will allocate 4 bytes (C type  
  2312. long which equals to an approximately -2 billion to +2 billion size integer).  
  2313.  
  2314. Return Value: 
  2315.  
  2316. [RETVAL] = 0 always 
  2317.  
  2318. Example -  Define the variable "ANSWER" as a string type. 
  2319.  
  2320.     DEFINE "ANSWER" STRING 
  2321.  
  2322.  
  2323.  
  2324. EXIT [intvalue] 
  2325.  
  2326. Parameter       Description and Notes 
  2327. [intvalue]      An integer type variable. 
  2328.  
  2329.  
  2330. Description - Ends the script. 
  2331.  
  2332. Tips: 
  2333.  
  2334. 1) If [intvalue] is set to a non-zero value, then the login module will  
  2335. increment the error count by one for the upgrade package and note the log  
  2336. with the error number returned. 
  2337.  
  2338. 2) If the package has been defined to execute the script before decompressing  
  2339. the fileset, then the EXIT command will prevent the decompression of the  
  2340. fileset.  (For more information on defining "Advanced Package Options,"  
  2341. refer to the section later in this chapter.) 
  2342.  
  2343. Return Value: none 
  2344.  
  2345. Example -  End the script if an obtained value is greater than 50: 
  2346.  
  2347.     IF RESULT <= 50 
  2348.         CFGSETVALUE "FILES" 55 
  2349.     ELSE 
  2350.         EXIT 1 
  2351.     ENDIF 
  2352.  
  2353.  
  2354. IF [intvalue1] [condoper] [intvalue2] ... {ELSE...} ENDIF 
  2355.  
  2356. Parameter       Description and Notes 
  2357. [intvalue1]     An integer type variable to be evaluated against [intvalue2]. 
  2358.  
  2359. [condoper]      Valid conditional operators are: =, !=, <, >, <=, >= 
  2360.  
  2361. [intvalue2]     An integer type variable to evaluate [intvalue1] against. 
  2362.  
  2363. Description - Allows conditional processing of functions.  IF..THEN  
  2364. evaluates the conditional expression defined by [intvalue1] [condoper]  
  2365. [intvalue2].  If the condition evaluates to be TRUE, then all functions  
  2366. following THEN are executed until an ELSE or ENDIF is reached.  If the  
  2367. condition evaluates to FALSE and ELSE is defined, then all functions  
  2368. following the ELSE are executed until an ENDIF is reached.   
  2369.  
  2370. Tip - IFs can be nested up to 50 levels deep. 
  2371.  
  2372. Return Value: none 
  2373.  
  2374. Example -  Obtain the FILES= value from the CONFIG.SYS file.  If the value  
  2375. is less than or equal to 50, then change the value to 55; otherwise, exit  
  2376. the script: 
  2377.  
  2378.     DEFINE "RESULT" INTEGER 
  2379.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2380.     CFGGETVALUE "FILES" RESULT 
  2381.     IF RESULT <= 50 
  2382.         CFGSETVALUE "FILES" 55 
  2383.     ELSE 
  2384.         EXIT 1 
  2385.     ENDIF 
  2386.  
  2387.  
  2388. NUMTOSTR [strvar] [intvalue] 
  2389.  
  2390. Parameter       Description and Notes 
  2391. [strvar]        The variable to contain the converted value.  (Before being  
  2392.         used as a parameter, this variable must be defined using  
  2393.         the DEFINE function.) 
  2394.  
  2395. [intvalue]      The numeric value to be converted. 
  2396.  
  2397.  
  2398. Description - Converts a numeric value to a string variable. 
  2399.  
  2400. Return Value: 
  2401.  
  2402. [RETVAL] = 0 always 
  2403.  
  2404. Example -  Convert the number 100 to a string and store the value in the  
  2405. defined variable named ONEHUNDRED: 
  2406.  
  2407.     DEFINE "ONEHUNDRED" STRING 
  2408.     NUMTOSTR ONEHUNDRED 100 
  2409.  
  2410.  
  2411. PAUSE [text] 
  2412.  
  2413. Parameter       Description and Notes 
  2414. [text]          The text to be displayed on the user's screen during the  
  2415.         pause. (This can be NULL) 
  2416.  
  2417.  
  2418. Description - Pauses execution of the script until the user presses a key. 
  2419.  
  2420. Tip - If [text]1 is NULL, then the default message "Strike any key to  
  2421. continue" is displayed on the screen. 
  2422.  
  2423. Return Value = 0 always 
  2424.  
  2425. Example -  Display the message "Pausing... press any key to continue"  
  2426. during script execution. 
  2427.  
  2428.     PAUSE "PAUSING ... PRESS ANY KEY TO CONTINUE." 
  2429.  
  2430.  
  2431.  
  2432. REBOOT 
  2433.  
  2434. This function immediately reboots the user's PC.  It does not accept any  
  2435. parameters and does not return any values.  Before the reboot, the script  
  2436. file is closed, the log database is closed, and any necessary cleanup is  
  2437. performed. 
  2438.  
  2439. NOTES: a - The PC will not reboot if a fileset is to be executed after the  
  2440. script. 
  2441. b -  The REBOOT function might not work if the workstation is not 100% PC  
  2442. compatible. 
  2443.  
  2444.  
  2445. SHELL [pathfile] {text} {shellopt} 
  2446.  
  2447. Parameter       Description and Notes 
  2448. [pathfile]      The path and file name to execute. 
  2449. {text}          The file's optional command line arguments.  (This can be  
  2450.         NULL.) 
  2451.  
  2452. {shellopt}      Optional argument which can only be either [KEEPPATH] or NULL. 
  2453.  
  2454.  
  2455. Description - Allows a user to execute an external DOS batch file,  
  2456. executable program, or DOS command. 
  2457.  
  2458. Tip - To execute the program or batch file in [pathfile] and change to the  
  2459. specified path, use the KEEPPATH option as the {shellopt} parameter.  If  
  2460. you don't specify the KEEPPATH option, SHELL will try to use the path from  
  2461. which the SDUPDATE program was run.  KEEPPATH allows you to temporarily  
  2462. switch to the path from where you want to run the program. 
  2463.  
  2464. Return Values: 
  2465.  
  2466. [RETVAL] = 0 if successful 
  2467. [RETVAL] = -1 if failed 
  2468.  
  2469. Example -  Execute LIST.COM and load the contents of the README.TXT file.  
  2470. Temporarily make the current directory C:\PUB\LIST.COM. 
  2471.  
  2472.     SHELL "C:\PUB\LIST.COM" "README.TXT" "" KEEPPATH 
  2473.  
  2474.  
  2475. STRCAT [strvar] [strvalue] 
  2476.  
  2477. Parameter       Description and Notes 
  2478. [strvar]        The variable to contain the concatenated string  
  2479.         (i.e., destination).  (Before being used as a parameter,  
  2480.         this variable must be defined using the DEFINE function.) 
  2481.  
  2482. [strvalue]      The string value to be appended (i.e., source). 
  2483.  
  2484.  
  2485. Description - Appends the contents of [strvalue] to the end of the string  
  2486. [strvar]. 
  2487.  
  2488. Tip - If the resulting text in [strvar] is longer than the space allowed  
  2489. (255 bytes), then it will be truncated and properly null terminated. 
  2490.  
  2491. Return Value: 
  2492.  
  2493. [RETVAL] = 0 always 
  2494.  
  2495. Example -  Add the string "ADDTHIS" to a string variable named STRINGS1&2: 
  2496.  
  2497.     DEFINE "STRINGS1&2" STRING 
  2498.     STRCAT STRINGS1&2 "ADDTHIS" 
  2499.  
  2500.  
  2501. STRCOMPARE [strvar] [strvalue] 
  2502.  
  2503. Parameter       Description and Notes 
  2504. [strvar]        The variable to be compared.  (Before being used as a  
  2505.         parameter, this variable must be defined using the  
  2506.         DEFINE function.) 
  2507.  
  2508. [strvalue]      The value to compare the variable against.  
  2509.  
  2510.  
  2511. Description - Does a byte for byte comparison of two strings. 
  2512.  
  2513. Return Values: 
  2514.  
  2515. [RETVAL] = 0 if the strings are identical 
  2516. [RETVAL] = < 0 if [strvar] is less than [strvalue] 
  2517. [RETVAL] =  > 0 if [strvar] is greater than [strvalue] 
  2518.  
  2519. Example -  Check the current NetWare login name against a specified login  
  2520. name ("Supervisor"). 
  2521.  
  2522.     DEFINE "NAME" STRING 
  2523.     STRCOPY NAME [LOGINNAME] 
  2524.     STRCOMPARE NAME "SUPERVISOR" 
  2525.  
  2526.  
  2527. STRCOPY [strvar] [strvalue] 
  2528.  
  2529. Parameter       Description and Notes 
  2530. [strvar]        The variable to receive the copied string value  
  2531.         (i.e., destination).  (Before being used as a parameter,  
  2532.         this variable must be defined using the DEFINE function.) 
  2533.  
  2534. [strvalue]      The string value to be copied (i.e., source). 
  2535.  
  2536.  
  2537. Description - Copies a value into a string, overwriting the previous  
  2538. contents of the string. 
  2539.  
  2540. Return Value: 
  2541.  
  2542. [RETVAL] = 0 always 
  2543.  
  2544. Example -  Copy the string "ABC" into the string variable named "HOLDABC": 
  2545.  
  2546.     DEFINE "HOLDABC" STRING 
  2547.     STRCOPY HOLDABC "ABC" 
  2548.  
  2549.  
  2550. WRITELN [strvalue] 
  2551.  
  2552. Parameter       Description and Notes 
  2553. [strvalue]      The string to display on screen. 
  2554.  
  2555.  
  2556. Description - Writes the [strvalue] line to stdout (e.g., the screen).   
  2557. This might be useful for displaying error messages, etc. 
  2558.  
  2559. Return Value: 
  2560.  
  2561. [RETVAL] = 0 always 
  2562.  
  2563. Example -  Define the variable named RESULT.  Place the value of the  
  2564. FILES= statement in the CONFIG.SYS file into RESULT, and then write the  
  2565. value of RESULT. 
  2566.  
  2567.     DEFINE "VALUE" STRING 
  2568.     DEFINE "RESULT" INTEGER 
  2569.     SETSYSFILE "C:\" "CONFIG.SYS" 
  2570.     CFGGETVALUE "FILES" RESULT 
  2571.     NUMTOSTR VALUE RESULT 
  2572.     WRITELN VALUE 
  2573.  
  2574.  
  2575.  
  2576. 7.8 Rules and System Variables 
  2577.  
  2578. Most of the functions in the BrightWorks script language have parameters  
  2579. that are specified or passed to them.  The valid entries for each parameter  
  2580. type are called rules.  For example, the UPGRADEOS function has one  
  2581. parameter named [upgopt].  As indicated in the table below, the value of  
  2582. the [upgopt] parameter can be either 5.00 or 6.00.  Therefore, the  
  2583. allowable values for the [upgopt] parameter are 5.00 and 6.00. 
  2584.  
  2585. NOTE:  When a user defined variable of string type is expected, [STRVAR] is  
  2586. the rule.  When a user defined variable of integer type is expected,  
  2587. [INTVAR] is the rule. 
  2588.  
  2589. The table below lists the rules (allowable values) for each parameter. 
  2590.  
  2591. Rule Name       Allowed Values 
  2592. ADDOPT          BEFORE AFTER 
  2593. ATTRIBUTE       RO  RW  A  SY  H  SH -A -SY -H -SH 
  2594. CONDOPER        <  >  =  !=  >=  <= 
  2595. DEFINEOPT       STRING  INTEGER 
  2596. DELETEOPT       ALL 
  2597. FILENAME        [STRVAR] "filename.ext" (wild cards not allowed for file name) 
  2598. FILEWILD        [STRVAR] "filename.ext" "*.*" (wild cards are allowed but  
  2599.         not required for a file name) 
  2600. INTVALUE        [INTVAR] [RETVAL]  # (where # is a valid integer) 
  2601. INTVAR          [INTVAR] 
  2602. PATH            [STRVAR] "path" [TARGET] [BOOT_ROOT] [WINDIR] [WINSYSDIR]  
  2603.         [NETCFG] [HDRIVE] [NDRIVE] [SERVERNAME] [LOGINNAME]  
  2604.         [FUSIONNAME] [LOGSCRNAME] 
  2605. PATHFILE        [STRVAR] "{path\}filename.ext" 
  2606. SHELLOPT        KEEPPATH 
  2607. STRVAR          [STRVAR] 
  2608. STRVALUE        [STRVAR] "text" [TARGET] [BOOT_ROOT] [WINDIR] [WINSYSDIR]  
  2609.         [NETCFG] [HDRIVE] [NDRIVE] [SERVERNAME] [LOGINNAME]  
  2610.         [FUSIONNAME] [LOGSCRNAME] 
  2611. TEXT            "text" 
  2612. UPGOPT          5.00 6.00 
  2613.       
  2614.  
  2615. 7.8.1 System Variables 
  2616.  
  2617. The rules listed in the above table are defined as follows: 
  2618.  
  2619. 7.8.2 String Type Rules: 
  2620.  
  2621. [BOOT_ROOT] - the root of the boot drive of the workstation on which the  
  2622. script is executed 
  2623.  
  2624. [HDRIVE] - drive letter of the first available hard drive  (may be boot or  
  2625. network drive) 
  2626.  
  2627. [FUSIONNAME] - primary user name from BrightWorks databases (generally same  
  2628. as LOGINNAME) 
  2629.  
  2630. [LOCATION] - location field from BrightWorks inventory databases 
  2631.  
  2632. [LOGINNAME] - login name of user 
  2633.  
  2634. [LOGSCRNAME] - full path and file name of login script for user running  
  2635. update. 
  2636.  
  2637. [NDRIVE] - drive letter of the first available network drive 
  2638.  
  2639. [NETCFG] - path to NET.CFG used at NetWare shell load (must be in path) 
  2640.  
  2641. [SERVERNAME] - name of server on which the update program is running 
  2642.  
  2643. [TARGET] - installation path as defined by the administrator (or changed  
  2644. by user, if able to) 
  2645.  
  2646. [WINDIR] - the user's Windows directory (directory in which the login  
  2647. module finds WIN.INI - this directory must be in the path) 
  2648.  
  2649. [WINSYSDIR] - the user's Windows\System directory (directory in which the  
  2650. login module finds USER.EXE - this directory may be in the SYSTEM  
  2651. directory below WINDIR, or in the path) 
  2652.  
  2653. 7.8.3 Integer Type Rules: 
  2654.  
  2655. [DISKSPACE] - available disk space in drive specified in [TARGETDIR].   
  2656. The number is in bytes. 
  2657.  
  2658. [RETVAL] - return code of last command completed 
  2659.  
  2660.  
  2661. 7.9 DOS Error Codes 
  2662.  
  2663. The following lists the DOS error codes that may be returned from the  
  2664. script functions.  For each error, the number, message, reason, action,  
  2665. and functions that return the error are described. 
  2666.  
  2667. o Message # 2 - "File not found." Reason: file specified in the script  
  2668. does not exist. Check the filename and path. Functions returning error: 
  2669. GETINISTR() - The file from which you requested a string does not exist.  
  2670. GETINIINT() - The file from which you requested an integer does not exist. 
  2671.  
  2672. o  Message # 3 -  "Path not found." Reason: a directory path specified  
  2673. in the script does not exist.  Check the path and directory name.  Functions 
  2674. returning error: DELETEDIR() - The directory that you requested to delete  
  2675. does not exist, or it does not exist in the location you specified. 
  2676.  
  2677. o  Message # 4 - "Too many open files (no handles left)." Reason:  
  2678. insufficient file handles are specified in CONFIG.SYS.  Increase the  
  2679. number of file handles in CONFIG.SYS.  Functions returning error: COPY()  
  2680. All Easy System File and Windows System File functions. 
  2681.  
  2682. o  Message # 5 - "Access denied." Reasons: specified drive or file cannot  
  2683. be accessed. Insufficient user rights, read only files, disk full. Verify  
  2684. the user rights, file attributes and available disk space. Functions  
  2685. returning error: DELETEFILE(), ADDPATH(), ADDLINE(), REPLACELINE(),  
  2686. REPLACEKEY(), ADDDEVICE(), CFGSETVALUE(), CFGSETSTRING(), REPLACELINEADD(),  
  2687. WRITEINISTR(), WRITEINIINT() - Is the file flagged read only?  Is the  
  2688. disk full?  Does the end user have insufficient rights in the specified  
  2689. directory?  DELETEDIR() - Subdirectories and/or files exist, and the  
  2690. "ALL" option was not used in the script.  ADDGROUP(), ADDITEM(),  
  2691. SCHEDULEWIN() - Is WIN.INI flagged read only?  
  2692.  
  2693. o  Message # 8 - "Insufficient memory" Reason: Not enough memory to  
  2694. complete the specified action. Unload unnecessary TSRs, check workstation  
  2695. memory management.  Functions returning this error: All DOS, Easy System  
  2696. File and Windows System File functions. 
  2697.  
  2698. o  Message # 15 - "Invalid drive" Reason: The drive specified does not  
  2699. exist. Check the drives specified in the script. Functions returning this       
  2700. error: All DOS, Easy System File and Windows System File functions. 
  2701.  
  2702. o  Message # 16 - "Attempt to remove current directory" Reason: The  
  2703. directory you attempted to delete is active on a drive.  Functions returning               
  2704. this error: DELETEDIR() - Is the directory specified active on the drive?   
  2705. If it is a network drive, are other users active on the drive?  
  2706.  
  2707. o  Message # 17 - "Not same device" Reason: An action was specified on  
  2708. two separate drives.  Ensure that you are not attempting to "cross drives"  
  2709. on an action that does not permit this (e.g., RENAME)  Functions returning   
  2710. this error: RENAME() - Are the source and target locations different? 
  2711.  
  2712. o  Message # 18 - "No more files"  Reason: The specified file could not be  
  2713. found.  Check the path and filename. Check end user rights in the directory  
  2714. specified.  Functions returning this error: DELFILE(), ATTRIB(), RENAME(),  
  2715. SETSYSFILE(),  COPY() - Does the specified file exist in the location  
  2716. specified?  Does the end user have sufficient rights to see the file? 
  2717.  
  2718. o  Message # 19 - "Disk is write protected"  Reason:  The write protect  
  2719. tab is enabled on the disk specified in the operation.  Remove the write  
  2720. protect tab.  Functions returning this error:  All DOS, Easy System File  
  2721. and Windows System File functions. 
  2722.  
  2723. o  Message # 21 - "Drive not ready"  Reason: There is no disk in the drive  
  2724. specified in the operation. Insert the diskette.  Functions returning this   
  2725. error: All DOS, Easy System File and Windows System File functions. 
  2726.  
  2727. o  Message # 22 - "Invalid disk command"  Reason: Media access error.      
  2728. Check the diskette or drive. Functions returning this error: Bad or  
  2729. damaged diskette. 
  2730.  
  2731. o  Message # 23  - "CRC error"  Reason: Media access error.  Check the  
  2732. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2733.  
  2734. o  Message # 24 - "Invalid length"  Reason: Media access error.  Check the  
  2735. diskette or drive. Functions returning this error: Bad or damaged diskette. 
  2736.  
  2737. o  Message # 25 - "Seek error"  Reason: Media access error.  Check the  
  2738. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2739.  
  2740. o  Message # 27 - "Sector not found"  Reason: Media access error.  Check  
  2741. the diskette or drive.  Functions returning this error: Bad or damaged  
  2742. diskette. 
  2743.  
  2744. o  Message # 29 - "Write fault"  Reason: Media access error.  Check the  
  2745. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2746.  
  2747. o  Message # 30 - "Read fault"  Reason: Media access error. Check the  
  2748. diskette or drive.  Functions returning this error: Bad or damaged diskette. 
  2749.  
  2750. o  Message # 31 - "General failure"  Reason:  Media access error.  Check  
  2751. the diskette or drive.  Functions returning this error:  Diskette may  
  2752. not be formatted. 
  2753.  
  2754.  
  2755.  
  2756. 8.0 Scopes 
  2757.  
  2758. Chapter 7 discussed the software distribution script language  This  
  2759. chapter discusses the creation and management of scopes--the group of  
  2760. workstations defined to receive a distributed package. 
  2761.  
  2762.  
  2763.  
  2764. 8.1 Introduction 
  2765.  
  2766. A scope is a group of workstations defined to receive a distributed  
  2767. package.  Defining a scope is as easy as assigning a name to the new  
  2768. scope.  After the scope is created, any number of workstations can be  
  2769. included in the scope definition. 
  2770.  
  2771. 8.1.1 Scope Features 
  2772.  
  2773. By taking advantage of the database of inventory information maintained  
  2774. by BrightWorks, users can create scopes by selecting from nodes that match  
  2775. specific filtering criteria.   
  2776.  
  2777. The filtering criteria is saved as a "query" and then applied against the  
  2778. database to narrow down the list of applicable workstations.  Scope  
  2779. membership is subsequently assigned using the list of nodes that match the  
  2780. user-specified filtering criteria.  Items such as CPU speed, workstation  
  2781. memory and installed software can be used to accommodate a scope's intent.   
  2782. For example, a scope named CPU386 might consist of the network's 386  
  2783. workstations; a scope named 386>16MHz might consist of the network's 386  
  2784. workstations that also have a CPU clock frequency greater than 16 MHz. 
  2785.  
  2786. Scopes and queries can be stored, used and reused as resources within  
  2787. BrightWorks.  A user can create a new scope, as well as edit, copy,  
  2788. rename and delete a scope.  The steps for managing both scopes and queries  
  2789. are provided in this chapter. 
  2790.  
  2791. 8.1.2 Access to Scope Functions 
  2792.  
  2793. Scope functions are accessed by choosing the Scopes command from the  
  2794. Tools menu.  The Scopes dialog box displays listing all available scopes. 
  2795.  
  2796. 8.1.3 What's in this Chapter 
  2797.  
  2798. The following chart describes the sections in this chapter: 
  2799.  
  2800. SECTION                 DESCRIPTION 
  2801. Creating Scopes         Describes procedures for defining new scopes. 
  2802.  
  2803. Scope Queries           Describes procedures for applying queries to  
  2804.             scopes, removing queries from scopes, creating  
  2805.             new queries, editing queries and deleting queries. 
  2806.  
  2807. Managing Scopes         Describes procedures for editing, renaming,  
  2808.             copying and deleting scopes. 
  2809.  
  2810.  
  2811. 8.2 Creating Scopes 
  2812.  
  2813. Use the following procedure to create a new scope. 
  2814.  
  2815. NOTE:  At least one audit must have been run in order to create a scope. 
  2816.  
  2817. 1.  Choose the Scopes command from the Tools menu. 
  2818.  
  2819.     The Scopes dialog box displays listing the names of all defined scopes.   
  2820.  
  2821. 2.  Choose the New button. 
  2822.  
  2823.     The New Scope dialog box displays prompting you to enter a name for  
  2824.     the new scope.   
  2825.  
  2826. 3.  Enter the new scope name, and choose the OK button. 
  2827.  
  2828.     A scope name can be up to 80 characters, and all typed characters are  
  2829.     valid.  For example, enter the new scope name "386/16MHZ" which will  
  2830.     include the network's 386/16MHz nodes. 
  2831.  
  2832.     Upon choosing the OK button, the Edit Scope dialog box displays  
  2833.     prompting you to define the new scope. 
  2834.  
  2835.     The Edit Scope dialog box consists of two lists: 
  2836.  
  2837.     o  Nodes in SITE - the list on the left side of the dialog box  
  2838.     consists of all node names that apply to the local site.  The  
  2839.     site name is indicated by the SITE text in the list title. The  
  2840.     nodes in this list are not included in the selected scope  
  2841.     (i.e., the list to the right).   
  2842.  
  2843.     o  Nodes included in Scope - the list on the right side of the  
  2844.     dialog box consists of the nodes that are in the selected scope.   
  2845.  
  2846. NOTE:  The Query Options section of the Edit Scope dialog box is used to  
  2847. perform a query to filter the node names in the Nodes in SITE list.   
  2848. For detailed instructions on performing queries, refer to the next  
  2849. section of this chapter entitled "Scope Queries." 
  2850.  
  2851. 4.  Define the nodes to be included in the scope. 
  2852.  
  2853.     Use the push buttons in the center of the Edit Scope dialog box to  
  2854.     define the scope members.  To define scope membership, select a node  
  2855.     name from either list and choose the appropriate button: 
  2856.  
  2857.     o  Include >> - choose this button to include the selected node  
  2858.     in the scope.  The node name moves from the left list to the right  
  2859.     list. 
  2860.  
  2861.     o  Include All - choose this button to include all listed nodes in  
  2862.     the scope.  All node names move from the left list to the right list. 
  2863.  
  2864.     o  << Remove - choose this button to remove the selected node from  
  2865.     the scope.  The node name moves from the right list to the left list. 
  2866.  
  2867.     o  Remove All - choose this button to remove all nodes from the  
  2868.     scope.  All node names move from the right list to the left list. 
  2869.  
  2870. NOTE:  Because user names can be edited via the View Inventory Details  
  2871. dialog box, the node names in the Nodes in SITE list do not necessarily  
  2872. correspond to NetWare user names.  As a result, there may be duplicate  
  2873. names in this list.  Viewing the inventory details of nodes with the same  
  2874. name enables you to differentiate between the nodes.  Choose the View  
  2875. button or double click on a name in either list to invoke the View  
  2876. Inventory Details dialog box for the selected node.  
  2877.  
  2878. 5.  When the scope members are defined, choose the Save button. 
  2879.  
  2880.  
  2881. 8.3 Scope Queries 
  2882.  
  2883. When no filtering criteria is applied to a scope, all nodes in the  
  2884. local BrightWorks site are listed in the Nodes in SITE list of the Edit  
  2885. Scope dialog box.  This condition is indicated by the <None> entry in  
  2886. the Last Query field.   
  2887.  
  2888. Searching through a large list of nodes might make the process of  
  2889. defining scope membership cumbersome.  Applying a query to a scope refines  
  2890. the number of nodes in the Nodes in SITE list so that scope membership  
  2891. can be made from a "qualified" list of nodes. 
  2892.  
  2893. NOTE:  Only one query can be applied to a scope at any time.  Each query  
  2894. can consist of more than one filtering criteria.  An applied query  
  2895. always filters from the entire list of nodes in the local BrightWorks site. 
  2896.  
  2897. Queries can be saved and applied to any number of scopes.  The same queries  
  2898. can be applied to BrightWorks inventory and distribution reports, as is  
  2899. discussed in Chapter 9 of the LAN Inventory manual. 
  2900.  
  2901. This section lists the procedures for: 
  2902. o  Creating a new query 
  2903. o  Editing a query 
  2904. o  Deleting a query 
  2905. o  Applying a query to the scope  
  2906. o  Removing a query from the scope  
  2907.  
  2908. 8.3.1 Creating a New Query 
  2909.  
  2910. Use the following procedure to create a new query.  The procedure assumes  
  2911. that you have already chosen the Select button in the Edit Scope dialog  
  2912. box to display the Select Query dialog box. 
  2913.  
  2914. NOTE:  All queries are also available when generating BrightWorks  
  2915. inventory and distribution reports, as discussed in Part Three,  
  2916. Chapter 9 of the LAN Inventory manual.  
  2917.  
  2918. 1.  Choose the Add button in the Select Query dialog box. 
  2919.  
  2920.     The Add Query dialog box displays.  Press the <TAB> key to move  
  2921.     from field to field within this dialog box. 
  2922.  
  2923. 2.  Enter a Query Name and define a filter entry. 
  2924.  
  2925.     The purpose of each filter entry is to narrow down the list of nodes  
  2926.     that apply to the specified criteria.  If more than one filter entry  
  2927.     is defined, the entries are "linked" using either the AND or OR  
  2928.     relationship.   
  2929.  
  2930.     For example, assume the following two filter entries: 
  2931.  
  2932.     Central Processing Unit = Intel_80386 
  2933.     CPU Clock Frequency > 66.00 Mhz 
  2934.  
  2935.     If the entries are linked with the OR relationship, only the nodes  
  2936.     that satisfy either criteria (i.e., all Intel 80386 machines and  
  2937.     all machines that have a clock speed greater than 66 Mhz) are  
  2938.     included in the database sort. 
  2939.  
  2940.     If the entries are linked with the OR relationship, the nodes that  
  2941.     satisfy either criteria (i.e., all 286 machines and all machines  
  2942.     that have a 720k floppy drive) are included in the database sort.  
  2943.  
  2944.     For each filter entry, specify the following: 
  2945.  
  2946.     o  Query Name - Enter a query name up to 80 characters in length. 
  2947.  
  2948.     o  Component - Choose a component from the BrightWorks inventory  
  2949.     database to use as the filter basis.  Select a component from the  
  2950.     drop-down list associated with this field (e.g., Brand, Computer  
  2951.     Model, CPU Clock Frequency). 
  2952.  
  2953.     o  Condition - Choose a conditional operator from the drop-down  
  2954.     list associated with this field (e.g., equal to, less than,  
  2955.     greater than, not equal to).  'Equal to' is the default condition. 
  2956.  
  2957.     o  Description - If desired, choose a description of the component.   
  2958.     The items which automatically display in this list depend on the  
  2959.     selected component.  For example, "Intel_80386" might display if  
  2960.     Central Processing Unit is entered in the Component field;  
  2961.     "16.00 Mhz" might display if CPU Clock Frequency is entered in the  
  2962.     Component field.  See Note (a) below. 
  2963.  
  2964.     o  Query Link - Specify the relationship between the filter  
  2965.     entries (e.g., Central Processing Unit = 80386 OR Central  
  2966.     Processing Unit = 80486).  The link options are AND and OR.   
  2967.     See Note (b) below. 
  2968.  
  2969. NOTES:  a - To create a query which tests for the presence of a  
  2970. component, leave the Description field blank.  For example, to include  
  2971. all nodes with a hard disk, construct a query with the following entries: 
  2972.  
  2973.     Component =  
  2974.     Hard Disk #1 < > 
  2975.  
  2976. In this case, the Component description is left blank, and the query  
  2977. results in including all nodes which have a hard disk (i.e., Hard Disk  
  2978. #1 does not equal blank). 
  2979. b - All filter entries in a query must have the same Query Link type  
  2980. (e.g., all entries will be linked by AND or all entries will be linked by OR). 
  2981.  
  2982. 3.  Choose the Insert button to accept the filter entry definition. 
  2983.  
  2984.     The entry is added to the Current Query List in the Edit Query dialog box. 
  2985.  
  2986. 4.  If required, insert additional filter entries.  
  2987.  
  2988.     Repeat steps #2 and #3 above. 
  2989.  
  2990. NOTE:  To add a filter entry between existing entries, first highlight  
  2991. the filter entry line in the Current Query list where you want the new  
  2992. entry to be placed.  The new defined entry is placed in the highlighted  
  2993. position. 
  2994.  
  2995. 5.  When all filter entries are defined, choose the Save button. 
  2996.  
  2997.     The query is saved and added to the Available Queries list in the  
  2998.     Select Query dialog box.  The new query can now be applied to a scope. 
  2999.  
  3000. 8.3.2 Editing a Query 
  3001.  
  3002. Use the following procedure to edit the definition of an existing query.   
  3003. The procedure assumes that you have already chosen the Select button in the  
  3004. Edit Scope dialog box to display the Select Query dialog box. 
  3005.  
  3006. 1.  Select a query from the Select Query dialog box, and choose the Edit  
  3007.     button. 
  3008.  
  3009.     The Edit Query dialog box displays showing the defined filter entries  
  3010.     for the query. 
  3011.  
  3012. 2.  Modify the filter information, and choose the Save button. 
  3013.  
  3014.     To delete a filter entry, highlight the entry in the Current Query  
  3015.     List and choose the Delete button. 
  3016.  
  3017.     To add a filter entry, specify the Component, Condition and Description,  
  3018.     and choose the Insert button.  (For detailed instructions on adding  
  3019.     filter entries, refer to the procedure above entitled "Creating a  
  3020.     New Query.") 
  3021.  
  3022. NOTE:  New filter entries are appended to the end of the Current Query  
  3023. List unless a filter entry is selected.  If an existing filter entry is  
  3024. selected, then the new filter entry gets inserted above it when you  
  3025. choose the Insert button. 
  3026.  
  3027. 8.3.3 Deleting a Query 
  3028.  
  3029. Use the following procedure to delete an existing query.  The procedure  
  3030. assumes that you have already chosen the Select button in the Edit Scope  
  3031. dialog box to display the Select Query dialog box. 
  3032.  
  3033. 1.  Select the query to be deleted from the Select Query dialog box, and  
  3034.     choose the Delete button. 
  3035.  
  3036.     A prompt displays asking you to confirm the deletion.   
  3037.  
  3038. 2.  Choose the Yes button to delete the query. 
  3039.  
  3040.     If deleted, the query name is removed from the Available Queries list.   
  3041.  
  3042. NOTE:  Queries that are currently applied to a scope and/or BrightWorks  
  3043. inventory and distribution report can be deleted. 
  3044.  
  3045. 8.3.4 Applying a Query to the Scope  
  3046.  
  3047. Use the following procedure to apply an existing query to a scope.  The  
  3048. procedure assumes that you have already chosen the Edit button in the  
  3049. Scopes dialog box to display the Edit Scope dialog box. 
  3050.  
  3051. 1.  Choose the Select button in the Query Options section of the Edit  
  3052.     Scope dialog box. 
  3053.  
  3054.     The Select Query dialog box displays listing all defined queries. 
  3055.  
  3056. 2.  Select the query name from the Available Queries list, and choose the  
  3057.     Apply button. 
  3058.  
  3059.     To select a query name, point to the query and click the left mouse  
  3060.     button.   
  3061.  
  3062. NOTE:  Applying a query to a scope causes a Printing Status dialog box to  
  3063. display while the database records are being sorted.  When this occurs,  
  3064. nodes are being selected (i.e., the information is not being sent to the  
  3065. printer). 
  3066.  
  3067.     The Select Query dialog box closes, and the selected query name is  
  3068.     placed into the Last Query field of the Edit Scope dialog box.  The  
  3069.     BrightWorks database records are sorted, and only the records that  
  3070.     match the query's specified filter criteria will display in the Nodes  
  3071.     in SITE list.  Now you can assign scope members using a "qualified"  
  3072.     list of nodes. 
  3073.  
  3074. NOTE:  If you already selected nodes to be included in the scope  
  3075. (i.e., the nodes listed in the Nodes Included in Scope list), the nodes  
  3076. continue to be "included" even if they do not match the filter criteria.   
  3077.  
  3078. 8.3.5 Removing a Query from the Scope 
  3079.  
  3080. Use the following procedure to remove a scope query.  
  3081.  
  3082. 1.  Choose the Select button in the Query Options section of the Edit  
  3083.     Scope dialog box. 
  3084.  
  3085.     The Select Query dialog box displays. 
  3086.  
  3087. 2.  Select the <None> query name, and choose the Apply button. 
  3088.  
  3089.     The Select Query dialog box closes.  All nodes in the local BrightWorks  
  3090.     site are listed in the Nodes in SITE list of the Edit Scope dialog box. 
  3091.  
  3092. 8.3.6 Creating a Complex Query 
  3093.  
  3094. A query can consist of any number of filter entries that are defined to  
  3095. produce a desired result.  The relationship between the filter entries is  
  3096. referred to as the "link." 
  3097.  
  3098. Assume that you are responsible for upgrading the workstations of all  
  3099. network users in the Sales Department who are currently using Intel 286  
  3100. machines with a CPU speed less than 16 MHz and which have a 1.44 megabyte  
  3101. floppy disk designated as drive A:.   
  3102.  
  3103. Use the following procedure to create a query that defines the scope of  
  3104. users in the above example. 
  3105.  
  3106. 1.  In the Add Query dialog box, enter a Query Name.  
  3107.  
  3108.     Enter a name that uniquely identifies this query  
  3109.     (e.g., "Sales 286/16Mhz"). 
  3110.  
  3111. 2.  Define the first filter entry, and choose the Insert button. 
  3112.  
  3113.     Enter the following for each field: 
  3114.  
  3115.     Component: Department 
  3116.     Condition: = 
  3117.     Description: Sales 
  3118.     Query Link: AND 
  3119.  
  3120. 3.  Define the second filter entry, and choose the Insert button. 
  3121.  
  3122.     Enter the following for each field: 
  3123.  
  3124.     Component: Central Processing Unit 
  3125.     Condition: = 
  3126.     Description: Intel_80286 
  3127.     Query Link: AND 
  3128.  
  3129. 4.  Define the third filter entry, and choose the Insert button. 
  3130.  
  3131.     Enter the following for each field: 
  3132.  
  3133.     Component: CPU Clock Frequency 
  3134.     Condition: < 
  3135.     Description: 16MHz 
  3136.     Query Link: AND 
  3137.  
  3138. 5.  Define the fourth filter entry, and choose the Insert button. 
  3139.  
  3140.     Enter the following for each field: 
  3141.  
  3142.     Component: Floppy Disk #1 
  3143.     Condition: = 
  3144.     Description: A: 1.44 M 
  3145.     Query Link: AND 
  3146.  
  3147. 6.  Choose the Save button to save the query. 
  3148.  
  3149.     The filter entries in the Current Query list in the Edit Query  
  3150.     dialog box should be identical to the following: 
  3151.  
  3152.     Department = Sales 
  3153.     Central Processing Unit = Intel_80286    AND 
  3154.     CPU Clock Frequency < 16MHz      AND 
  3155.     Floppy Disk #1 = A: 1.44 M       AND 
  3156.  
  3157.  
  3158.  
  3159. 8.4 Managing Scopes 
  3160.  
  3161. 8.4.1 Editing Scopes 
  3162.  
  3163. Editing a scope may become necessary under two circumstances: 
  3164.  
  3165. o  Existing scopes might need to be edited in order to add or delete  
  3166. members according to a change in a scope's intent. 
  3167.  
  3168. o  Scopes that are attached to packages might need to be edited when  
  3169. re-sending packages. 
  3170.  
  3171. Scope members are the nodes that are defined as a group to receive a  
  3172. distributed package.   
  3173.  
  3174. NOTE:  An existing scope can be edited even if the scope is part of a  
  3175. scheduled package.  This is useful if you need to re-send a package to  
  3176. a node(s).  If new nodes are added to a scope that is included in an  
  3177. active package, then the package will automatically get distributed to  
  3178. the new nodes. 
  3179.  
  3180. Use the following procedure to edit a scope.  The procedure assumes that  
  3181. you have already chosen the Scopes command from the Tools menu to  
  3182. display the Scopes dialog box. 
  3183.  
  3184. 1.  Select the scope from the list of Scopes, and choose the Edit button. 
  3185.  
  3186.     A scope can also be selected for editing by double clicking on the  
  3187.     scope name in the Scopes dialog box.  The Edit Scope dialog box displays. 
  3188.  
  3189.     The Edit Scope dialog box consists of two lists: 
  3190.  
  3191.     o  Nodes in SITE - the list on the left side of the dialog box  
  3192.     consists of all node names that apply to the local site.  The  
  3193.     site name is indicated by the SITE text in the list title.  The  
  3194.     nodes in this list are not included in the selected scope  
  3195.     (i.e., the list to the right).   
  3196.  
  3197.     o  Nodes included in Scope - the list on the right side of the  
  3198.     dialog box consists of the nodes that are in the selected scope.   
  3199.  
  3200. NOTE:  The Query Options section of the Edit Scope dialog box is used  
  3201. to perform a query to filter the node names in the Nodes in SITE list.   
  3202. for detailed instructions on performing queries, refer to section 8.3 
  3203. entitled "Scope Queries." 
  3204.  
  3205. 2.  Define the nodes to be included in the scope. 
  3206.  
  3207.     Use the push buttons in the center of the Edit Scope dialog box to  
  3208.     define the scope members.  To define scope membership, select a node  
  3209.     name from either list and choose the appropriate button: 
  3210.  
  3211.     o  Include >> - choose this button to include the selected node  
  3212.     in the scope.  The node name moves from the left list to the right  
  3213.     list. 
  3214.  
  3215.     o  Include All - choose this button to include all listed nodes  
  3216.     in the scope.  All node names move from the left list to the right  
  3217.     list. 
  3218.  
  3219.     o  << Remove - choose this button to remove the selected node  
  3220.     from the scope.  The node name moves from the right list to the  
  3221.     left list. 
  3222.  
  3223.     o  Remove All - choose this button to remove all nodes from the  
  3224.     scope.  All node names move from the right list to the left list. 
  3225.  
  3226. NOTE:  Because user names can be edited via the View Inventory Details  
  3227. dialog box, the node names in the Nodes in SITE list do not necessarily  
  3228. correspond to NetWare user names.  As a result, there may be duplicate  
  3229. names in this list.  Viewing the inventory details of nodes with the same  
  3230. name enables you to differentiate between the nodes.  Choose the View  
  3231. button or double click on a name in either list to invoke the View Inventory  
  3232. Details dialog box for the selected node.  
  3233.  
  3234. 3.  When the scope members are defined, choose the Save button. 
  3235.  
  3236. 8.4.1 Renaming Scopes 
  3237.  
  3238. Use the following procedure to rename a scope.  The procedure assumes  
  3239. that you have already chosen the Scopes command from the Tools menu to  
  3240. display the Scopes dialog box. 
  3241.  
  3242. NOTE:  A scope can be renamed even if it is part of an actively scheduled  
  3243. package. 
  3244.  
  3245. 1.  To rename a scope, select the scope from the list of Scopes, and  
  3246.     choose the Rename button. 
  3247.  
  3248.     The Rename Scope dialog box displays prompting you to enter a new  
  3249.     scope name. 
  3250.  
  3251. 2.  Enter the new scope name, and choose the OK button. 
  3252.  
  3253.     The new scope name displays in the Scopes dialog box, and the old  
  3254.     name is removed.  All attributes of the old scope are preserved in the  
  3255.     renamed scope (i.e., the scope members do not change). 
  3256.  
  3257. 8.4.2 Copying Scopes 
  3258.  
  3259. Use the following procedure to copy a scope.  The procedure assumes  
  3260. that you have already chosen the Scopes command from the Tools menu to  
  3261. display the Scopes dialog box. 
  3262.  
  3263. NOTE:  A scope can be copied even if the original scope is part of an  
  3264. actively scheduled package. 
  3265.  
  3266. 1.  To copy a scope, select the scope from the list of Scopes, and  
  3267.     choose the Copy button. 
  3268.  
  3269.     The Copy Scope dialog box displays prompting you to enter a name for  
  3270.     the new scope. 
  3271.  
  3272. 2.  Enter the new scope name, and choose the OK button. 
  3273.  
  3274.     The new scope name is added to the Scopes dialog box.  The new scope  
  3275.     members are identical to the original scope members. 
  3276.  
  3277.  
  3278. 8.4.3 Deleting Scopes 
  3279.  
  3280. Use the following procedure to delete a scope.  The procedure assumes  
  3281. that you have already chosen the Scopes command from the Tools menu to  
  3282. display the Scopes dialog box. 
  3283.  
  3284. NOTE:  A scope that is part of a scheduled package cannot be deleted. 
  3285.  
  3286. 1.  To delete a scope, select the scope from the list of Scopes, and  
  3287.     choose the Delete button. 
  3288.  
  3289.     A prompt displays asking you to confirm the deletion. 
  3290.  
  3291. 2.  Choose the Yes button to delete the scope. 
  3292.  
  3293.     If deleted, the scope name is removed from the Scopes dialog box.   
  3294.  
  3295.  
  3296.  
  3297. 9.0 Packages 
  3298.  
  3299. Chapter 8 discussed the creation and management of scopes.  This chapter  
  3300. discusses the creation and management of packages--the method by which  
  3301. software is distributed across your network. 
  3302.  
  3303.  
  3304.  
  3305. 9.1 Introduction 
  3306.  
  3307. Creating and activating a package is the method by which software is  
  3308. distributed across your local area network.  When a package is created,  
  3309. it is assigned a scope and a "Start Date."  Upon reaching the start date  
  3310. and running the SDUPDATE.EXE program at a workstation in the scope, an  
  3311. active package automatically gets sent to the workstation. 
  3312.  
  3313. A package also consists of a fileset and/or a script to be distributed to  
  3314. the group of remote workstations.  For example, a package named  
  3315. UPGRADE_DOS might include a scope of users running DOS 3.3.  The package  
  3316. might also include a script which installs a fileset consisting of the  
  3317. DOS 6.0 files. 
  3318.  
  3319. The software distribution update program (SDUPDATE.EXE) is integrated  
  3320. with the packaging functionality.  The update program is responsible for  
  3321. determining the conditions for accepting or rejecting a package.  The  
  3322. program is also responsible for reporting on package status as input to the  
  3323. Packages window and the Software Distribution Log. 
  3324.  
  3325. 9.1.1 Package Features 
  3326.  
  3327. In addition to the contents and scope, every package is assigned a schedule  
  3328. and a method for delivery.  A package's schedule is the date on which the  
  3329. package is to be distributed.  The method of delivery specifies instructions  
  3330. for the receiving workstation.  There are several options available to  
  3331. the workstation user when a package is received.  For example, package  
  3332. ABC might be configured to prompt the user five times to accept the  
  3333. package before proceeding with the installation of its fileset.   
  3334.  
  3335. A user can create a new package, as well as edit, rename and delete a  
  3336. package.  The steps for each procedure are discussed in this chapter.  
  3337.  
  3338. 9.1.2 Access to Package Functions 
  3339.  
  3340. Most package functions are accessed by either: 
  3341.  
  3342. o  choosing the Packages command from the Tools menu, or 
  3343. o  choosing the Distribute tool bar button  
  3344.  
  3345. Both of the above actions cause the Packages window to display.   
  3346.  
  3347. Package management is performed by either choosing the buttons in the  
  3348. Packages window or by choosing the corresponding commands from the File  
  3349. menu.  For example, when the Packages window is active, a new package  
  3350. can be created either by choosing the New button in the Packages window  
  3351. or by choosing the New Package command from the File menu.   
  3352.  
  3353. The information in the Packages window is updated according to an  
  3354. interval called the "package timer."  Package timer functions are accessed  
  3355. by choosing the Distribution command from the Administration menu.  
  3356.  
  3357. 9.1.3 What's in this Chapter 
  3358.  
  3359. The following chart describes the sections in this chapter: 
  3360.  
  3361. SECTION                         DESCRIPTION 
  3362. Creating and Editing Packages   Describes procedures for defining new  
  3363.                 packages and for editing existing packages. 
  3364.  
  3365. Managing Packages               Describes procedures for renaming,  
  3366.                 activating/deactivating, and deleting  
  3367.                 packages. 
  3368.  
  3369. The Package Timer               Describes procedures for setting the  
  3370.                 package timer interval. 
  3371.  
  3372.  
  3373.  
  3374. 9.2 Creating and Editing Packages 
  3375.  
  3376. Use the following procedure to create a new package. 
  3377.  
  3378. 1.  Choose the Packages command from the Tools menu, or choose the  
  3379.     Distribute tool bar button. 
  3380.  
  3381.     The Packages window displays.  This window lists the names of all  
  3382.     defined packages.  For each package, the following is indicated:  
  3383.  
  3384.     o  Start Date - the date the package will be distributed 
  3385.     o  Status - the package's status (Active or Inactive) 
  3386.     o  Total - the total number of workstation in the package's scope 
  3387.     o  Done - the number of successful updates so far 
  3388.     o  Errors - the total number of failed attempts at performing  
  3389.     an update 
  3390.  
  3391. NOTE:  Packages that have the same Start Date are distributed in the  
  3392. order in which they appear in the Packages window.  To change a  
  3393. package's priority, refer to section 9.3.1 entitled "Prioritizing  
  3394. Packages."  
  3395.  
  3396. 2.  Choose the New button in the Packages window. 
  3397.  
  3398.     The New Package dialog box displays prompting you to enter a name  
  3399.     for the new package. 
  3400.  
  3401. 3.  Enter the new package name, and choose the OK button. 
  3402.  
  3403.     The package name can be up to 80 characters, and all typed characters  
  3404.     are valid. 
  3405.  
  3406.     Upon choosing OK, a New Package dialog box displays.  The name of the  
  3407.     new package is indicated in the title bar of the dialog box. 
  3408.  
  3409. 4.  Select a fileset and/or a script to be included in the package. 
  3410.  
  3411.     Choose the down arrow button to the right of the Update Fileset  
  3412.     and/or Update Script fields to display the list of existing filesets  
  3413.     and scripts.  Select the desired items from the drop-down lists. 
  3414.  
  3415. NOTE:  A package must include either one fileset or one script, or both. 
  3416.  
  3417. 5.  Select the scope to receive the package. 
  3418.  
  3419.     Choose the down arrow button to the right of the Update Scope field  
  3420.     to display the list of existing scopes.  Select a scope from the  
  3421.     drop-down list. 
  3422.  
  3423. NOTE:  A scope must be assigned to the package. 
  3424.  
  3425. 6.  Assign the package's Start Date. 
  3426.  
  3427.     Enter the date on which the package is to be distributed.  The current  
  3428.     date appears as a default in this field.  Use the up/down arrow buttons  
  3429.     to the right of the Start Date field to scroll to the desired date,  
  3430.     or press the <F4> key to display a calendar from which a date can be  
  3431.     selected. 
  3432.  
  3433. 7.  Assign the Active or Inactive status to the package. 
  3434.  
  3435.     Check the "Update active when saved" option to automatically place  
  3436.     the package in an active state upon saving the package.  (An active  
  3437.     package will get distributed automatically on its assigned start date.) 
  3438.  
  3439.     If this field is not checked, an Inactive status will be assigned to  
  3440.     the package.  An inactive package will not get distributed  
  3441.     automatically on its assigned start date. 
  3442.  
  3443. 8.  Specify the package's update option. 
  3444.  
  3445.     The selected Update Option instructs the software distribution update  
  3446.     program how it should interact with the receiving workstation user at  
  3447.     login time. 
  3448.  
  3449.     The four Update Options are: 
  3450.  
  3451.     o  Force upgrade at next login - This option forces the package's  
  3452.     receipt on the user at the next login.  If an error occurs, the  
  3453.     distribution is halted so the administrator can address the  
  3454.     problem and reschedule the package. 
  3455.  
  3456.     o  User optional until [DATE] and then [ABANDON, FORCE] update -  
  3457.     This option allows the user to refuse the package until the  
  3458.     indicated DATE.  After the DATE, the package is either abandoned  
  3459.     or forced to be received by the user. 
  3460.  
  3461.     o  User optional, prompt user [# TIMES] and then [ABANDON, FORCE]  
  3462.     update - This option allows the user to refuse the package a  
  3463.     certain number of times (# TIMES).  After the threshold is reached,  
  3464.     the package is either abandoned or forced to be received by the user. 
  3465.  
  3466.     o  Run this package always - This option forces the package's  
  3467.     receipt on the user at each and every login.  This update option  
  3468.     is most useful in situations where system variables are being  
  3469.     modified directly by users. 
  3470.  
  3471. 9.  Specify the target path in which the fileset should be decompressed. 
  3472.  
  3473.     A default path must be assigned to the package.  The default path is  
  3474.     the target path in which the distributed software (i.e., fileset) is  
  3475.     to be installed or copied.   
  3476.  
  3477.     The default path can be: 
  3478.  
  3479.     o  entered as a hard-coded drive mapping and directory  
  3480.     combination (e.g., C:\BIN\DRIVERS). 
  3481.  
  3482.     o  entered as a hard-coded server, volume and directory  
  3483.     combination (e.g., SERVER/VOLUME:\DIR or VOLUME:\DIR).  If a  
  3484.     server is specified, then the user receiving the package must be  
  3485.     attached to the server. 
  3486.  
  3487.     o  reliant upon a system configuration found at the receiving  
  3488.     workstation.  Reliance is implemented by using one of the following  
  3489.     target default path options available from the drop down list  
  3490.     associated with this field: 
  3491.  
  3492.         - [BOOT_ROOT] - the root of the receiving machine's boot  
  3493.         disk 
  3494.         - [HDRIVE] - the receiving machine's first hard drive 
  3495.         - [NDRIVE] - the receiving machine's first network drive 
  3496.         - [NETCFG] - path to the receiving machine's network  
  3497.         configuration (which must be in the path) 
  3498.         - [WINDIR] - the receiving machine's Windows directory  
  3499.         (the directory in which the login module finds WIN.INI -  
  3500.         this directory must be in the path) 
  3501.         - [WINSYSDIR] - the receiving machine's Windows\System  
  3502.         directory (directory in which the login module finds  
  3503.         USER.EXE - this directory may be in the SYSTEM directory  
  3504.         below WINDIR, or in the path) 
  3505.  
  3506.     These variables can be used in combination with a hard-coded value  
  3507.     (e.g., [WINSYSDIR]\TEMP).  In this case, the backslash character (\)  
  3508.     is required and the variable name must be first.  If a specified  
  3509.     directory does not exist, it will be created. 
  3510.  
  3511.     If desired, check the "Allow user to override installation path" option  
  3512.     to allow the user at the receiving workstation to override the selected  
  3513.     path. 
  3514.  
  3515. 10. To define advanced package options, choose the Advanced button. 
  3516.  
  3517.     The Advanced Options dialog box displays.  The advanced package  
  3518.     options consist of the following categories: 
  3519.  
  3520.     o  Windows Error Options - options associated with how the software  
  3521.     distribution update program should react in the event that the Windows  
  3522.     directory is not discovered at a receiving workstation. 
  3523.  
  3524.     o  Fileset and Script Options - options which define the execution  
  3525.     precedence for the package's fileset and script  (e.g., which one  
  3526.     the software distribution update program should run first at the  
  3527.     receiving workstation).  
  3528.  
  3529.     o  Script Error Options - options associated with how the software  
  3530.     distribution update program should react in the event of script errors.    
  3531.     (The script function error codes are detailed in Chapter 7 of this  
  3532.     manual, "Software Distribution Script Language.") 
  3533.  
  3534. NOTE:  Several script functions may return a non-zero value that is not  
  3535. considered to be an error.  For example, the FINDFILE function returns  
  3536. a -1 if the file is not found; the STRCOMPARE function returns non-zero  
  3537. value if the two strings are not equal.  You might want to disable the  
  3538. Script Error Options when using functions that return non-zero values even  
  3539. when successful. 
  3540.  
  3541. 11. When all package attributes are defined, choose the Save button. 
  3542.  
  3543. 9.2.1 Editing Packages 
  3544.  
  3545. Editing a package may be necessary in order to modify package attributes. 
  3546.  
  3547. Use the following procedure to edit the attributes of a package.  The  
  3548. procedure assumes that you have already chosen the Packages command from  
  3549. the Tools menu to display the Packages window. 
  3550.  
  3551. 1.  To edit package attributes, select the package from the Packages  
  3552.     window, and choose the Edit button. 
  3553.  
  3554.     A package can also be selected for edit by double clicking on the  
  3555.     package name in the Packages window.  The Edit Package dialog box  
  3556.     displays showing the configuration of the selected package.  The  
  3557.     fields and options in this dialog box are identical to the New Package  
  3558.     dialog box. 
  3559.  
  3560.     The name of the package being edited displays in the title bar of  
  3561.     the Edit Package dialog box. 
  3562.  
  3563. 2.  Modify the package attributes. 
  3564.  
  3565.     Changes can be made to any field except the Update Scope, Update  
  3566.     Fileset and Update Script fields. 
  3567.  
  3568. NOTES: a - Although the package's scope, fileset and script cannot be  
  3569. changed, their definition can be changed.  For example, if Scope ABC  
  3570. is assigned to the package, you cannot assign Scope XYZ to the package  
  3571. but you can edit the members of scope ABC. 
  3572. b - If a package fails, it can be re-distributed to a user by first  
  3573. removing the user from the scope and saving the edited scope, and then  
  3574. adding the user back into the scope and again saving the edited scope.   
  3575. Be careful when doing this because editing a scope changes all instances  
  3576. of the scope (i.e., even those included in packages).  
  3577.  
  3578.     If the distribution of a package has already begun, the changes made  
  3579.     to the package take effect on the next node in the scope to receive  
  3580.     the package. 
  3581.  
  3582. 3.  Choose the Save button. 
  3583.  
  3584.     The Packages window re-displays.  
  3585.  
  3586. NOTE:  To display the Software Distribution Log History details  
  3587. associated with a package, highlight the package in the Packages window  
  3588. and choose the Details button.  The Log Details dialog box displays  
  3589. showing the details for the selected package.  This dialog box is discussed  
  3590. in Chapter 10. 
  3591.  
  3592.  
  3593. 9.3 Managing Packages 
  3594.  
  3595. 9.3.1 Prioritizing Packages 
  3596.  
  3597. The priority with which each package is run is determined by its position  
  3598. in the Packages window.  Packages that have the same Start Date are  
  3599. distributed in the order in which they are listed. 
  3600.  
  3601. To modify a package's run time, highlight the package in the Packages  
  3602. window, and choose either the Up or Down buttons.  The highlighted package  
  3603. will be moved in the selected direction. 
  3604.  
  3605. For example there are two packages scheduled to be distributed on  
  3606. 1/12/1994.  Because of their position in the list of packages, WIN_INI  
  3607. will be distributed before UPDATED SYSTEM FILES.  To change their  
  3608. distribution order, highlight the UPDATED SYSTEM FILES fileset and  
  3609. choose the up arrow button.  
  3610.  
  3611. Also note that the status of the TUTORIAL package is "Complete (A)."   
  3612. The (A) indicates that although the package has been distributed to all  
  3613. workstations in the scope, the package is still active.  Therefore, if  
  3614. the package's scope is edited to include additional nodes, the package will  
  3615. automatically get distributed to those new nodes. 
  3616.  
  3617. 9.3.2 Renaming Packages 
  3618.  
  3619. Changing the name of an existing package renames the package in the  
  3620. Packages window. 
  3621.  
  3622. Use the following procedure to rename a package.  The procedure assumes  
  3623. that you have already chosen the Packages command from the Tools menu  
  3624. to display the Packages window. 
  3625.  
  3626. NOTE:  Actively scheduled packages can be renamed. 
  3627.  
  3628. 1.  To rename a package, select the package from the Packages list, and  
  3629.     choose the Rename button. 
  3630.  
  3631.     The Rename Package dialog box displays prompting you to enter a new  
  3632.     package name. 
  3633.  
  3634. 2.  Enter the new package name, and choose the OK button. 
  3635.  
  3636.     The new package name displays in the Packages window, and the old  
  3637.     name is removed.  All attributes of the old package are preserved in  
  3638.     the renamed package (i.e., the package's scope, script and/or fileset  
  3639.     definitions do not change). 
  3640.  
  3641. 9.3.3 Activating/Deactivating Packages 
  3642.  
  3643. New packages are assigned the Active status if the Update Active when  
  3644. Saved option is selected.  An active package automatically gets distributed  
  3645. upon reaching its assigned Start Date.  An inactive package will not get  
  3646. distributed until it is re-activated. 
  3647.  
  3648. The status indication of a selected package in the Packages window  
  3649. toggles between Active/Inactive by choosing the Activate/Deactivate  
  3650. toggle button in the Packages window. 
  3651.  
  3652. The status of a completed package (i.e., a package that has been sent to  
  3653. all nodes in its scope) remains active.  Its status is indicated by  
  3654. "Complete (A)."  By highlighting the completed package and choosing the  
  3655. Deactivate toggle button, the status changes to "Complete (I)" which  
  3656. indicates an inactive status. 
  3657.  
  3658. 9.3.4 Deleting Packages 
  3659.  
  3660. Use the following procedure to delete a package.  The procedure assumes  
  3661. that you have already chosen the Packages command from the Tools menu to  
  3662. display the Packages window. 
  3663.  
  3664. NOTE:  Actively scheduled packages cannot be deleted.  To delete a package  
  3665. with an Active status, first make the package status Inactive by  
  3666. highlighting the package and choosing the Deactivate button.  Then  
  3667. perform the Delete action. 
  3668.  
  3669. 1.  To delete a package, select the package from the Packages window,  
  3670.     and choose the Delete button.  
  3671.  
  3672.     A prompt displays asking you to confirm the deletion. 
  3673.  
  3674. 2.  Choose the Yes button to delete the package. 
  3675.  
  3676.     If deleted, the package name is removed from the Packages window.   
  3677.  
  3678. NOTE:  Deleting a package does not delete the associated log entry in  
  3679. the Software Distribution Log History dialog box. 
  3680.  
  3681.  
  3682. 9.4 The Package Timer 
  3683.  
  3684. The Packages window displays the status of each scheduled package.   
  3685. Status information includes the number of workstations in the package's  
  3686. scope (Total), the current number of successful updates (Done) and the  
  3687. total number of failed attempts at performing an update (Errors).  The  
  3688. window contents are updated according to a defined package timer interval.   
  3689.  
  3690. Use the following procedure to set the package timer and define the  
  3691. interval at which the Packages window data is updated. 
  3692.  
  3693. 1.  Choose the Distribution command from the Administration menu.  From  
  3694.     the sub-menu that displays, choose the Set Package Timer command. 
  3695.  
  3696.     The Set Package Timer dialog box displays.  
  3697.  
  3698. 2.  Enter the time interval at which the Packages window should be  
  3699.     updated, and choose the OK button. 
  3700.  
  3701.     Enter the time in seconds.  (The default is 30 seconds.)  The  
  3702.     information in the Packages window will be updated at the defined  
  3703.     interval. 
  3704.  
  3705. NOTE:  The status of the Packages window can also be updated on demand  
  3706. by choosing the Distribution command from the Administration menu.   
  3707. From the sub-menu that displays, choose the Query Now command. 
  3708.  
  3709.  
  3710.  
  3711. 10.0 Monitoring Software Distribution 
  3712.  
  3713. Chapter 9 discussed the creation and management of packages.  This  
  3714. chapter discusses the procedures for using the Software Distribution Log  
  3715. History dialog box to monitor the success of distributed packages. 
  3716.  
  3717.  
  3718.  
  3719. 10.1 Introduction 
  3720.  
  3721. The chronological events associated with scheduled packages can be  
  3722. viewed from the Software Distribution Log History dialog box.  The log  
  3723. history provides the information necessary for monitoring the success or  
  3724. failure of a distributed package.  For example, if package WINUPDATE is  
  3725. distributed to a scope having three members, the installation of the  
  3726. software and update details for all three receiving workstations can be  
  3727. verified via the log history details. 
  3728.  
  3729. 10.1.1 Access to the Software Distribution Log 
  3730.  
  3731. The Software Distribution Log History dialog box is displayed by choosing  
  3732. the Distribution command from the Administration menu.  From the sub-menu  
  3733. that displays, choose the View Distribution Log command. 
  3734.  
  3735. The Software Distribution Log History dialog box is also displayed by  
  3736. choosing the Details button in the Packages window. 
  3737.  
  3738. 10.1.2 What's in this Chapter 
  3739.  
  3740. The following chart describes the sections in this chapter: 
  3741.  
  3742. SECTION                         DESCRIPTION 
  3743. The Software Distribution Log   Describes procedures for viewing and  
  3744.                 maintaining Log history details. 
  3745.  
  3746.  
  3747. 10.2 The Software Distribution Log 
  3748.  
  3749. 10.2.1 Viewing Log History Details 
  3750.  
  3751. Use the following procedure to monitor and maintain the log history of  
  3752. distributed packages. 
  3753.  
  3754. 1.  Choose the Distribution command from the Administration menu.  From  
  3755.     the sub-menu that displays, choose the View Distribution Log command. 
  3756.  
  3757.     The Software Distribution Log History dialog box displays.  The history  
  3758.     log provides a summary of all scheduled packages.  The following  
  3759.     information is provided for each package:  
  3760.  
  3761.     o  Start Date - the date the package will be distributed 
  3762.     o  Total - the total number of workstation in the package's scope 
  3763.     o  Done - the number of successful updates so far 
  3764.     o  Errors - the total number of failed attempts at performing an  
  3765.     update 
  3766.  
  3767. NOTE:  The completed updates (Done column) may be greater than the number  
  3768. of users scheduled to receive a package (Total column).  This can occur as  
  3769. a result of rescheduling packages or when using the "Run this package always"  
  3770. update option during package scheduling. 
  3771.  
  3772. 2.  To view the individual events of a package, select the package from  
  3773.     the Software Distribution Log History dialog box, and choose the  
  3774.     Details button. 
  3775.  
  3776.     A package can also be selected by double clicking on the package name  
  3777.     in the Software Distribution Log History dialog box.  The Log Details  
  3778.     dialog box for the selected package displays. 
  3779.  
  3780.     In addition to the distribution Date/Time and target Site Name, the  
  3781.     Details of the package's chronological events are shown in three lines: 
  3782.  
  3783.     o  Identification of the target workstation - node address, user name 
  3784.     o  Additional target workstation information - location, asset tag 
  3785.     o  Results - some possible results are:  
  3786.         - Package installed successfully. 
  3787.         - Error [#]: Script "[Script name]" has not been  
  3788.         completed successfully.  
  3789.  
  3790. NOTE:  The error numbers related to unsuccessful script execution are  
  3791. documented in Chapter 7 of this manual, "Software Distribution Script  
  3792. Language."  Non zero error numbers only display if the corresponding  
  3793. option was selected when the package was created.  For instructions on  
  3794. defining "advanced package options," refer to the previous chapter. 
  3795.  
  3796. 3.  To delete a log entry, select the package from the Software  
  3797.     Distribution Log History dialog box, and choose the Delete button. 
  3798.  
  3799.     The package is removed from the list of scheduled packages.  
  3800.  
  3801. NOTE:  A log entry cannot be deleted if its associated package still exists. 
  3802.  
  3803. 4.  Choose the OK button to close the Software Distribution Log History  
  3804.     dialog box. 
  3805.  
  3806.